FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
void NPObjectAPI::RemoveProperty ( const std::string &  propertyName)
virtual

Removes a property.

Parameters
propertyNameName of the property.
Since
1.5

Implements FB::JSAPI.

Definition at line 211 of file NPObjectAPI.cpp.

References FB::JSAPI::RemoveProperty().

Referenced by RemoveProperty().

212 {
213  if (m_browser.expired())
214  return;
215 
216  NpapiBrowserHostPtr browser(getHost());
217  if (!browser->isMainThread()) {
218  return browser->CallOnMainThread(boost::bind((FB::RemovePropertyType)&JSAPI::RemoveProperty, this, propertyName));
219  }
220  if (is_JSAPI) {
221  FB::JSAPIPtr tmp = inner.lock();
222  if (tmp)
223  return tmp->RemoveProperty(propertyName);
224  else
225  return /*false*/;
226  }
227  if (!browser->RemoveProperty(obj, browser->GetStringIdentifier(propertyName.c_str()))) {
228  throw script_error(propertyName.c_str());
229  }
230 }
virtual void RemoveProperty(const std::wstring &propertyName)
Definition: JSAPI.h:455
boost::shared_ptr< FB::JSAPI > JSAPIPtr
Defines an alias for a JSAPI shared_ptr (you should never use a JSAPI* directly)
Definition: APITypes.h:94
void(JSAPI::* RemovePropertyType)(const std::string &)
Defines an alias representing a function pointer to JSAPI::GetProperty.
Definition: APITypes.h:180

Here is the call graph for this function: