Skip to end of metadata
Go to start of metadata

FB::variant NPObjectAPI::GetProperty ( const std::string &  propertyName  )  [virtual]

Gets a property value.

Parameters:
propertyName Name of the property.
Returns:
The property value

Implements FB::JSAPI.

Definition at line 159 of file NPObjectAPI.cpp.

References FB::JSAPI::GetProperty().

Referenced by GetProperty().

00160 {
00161     if (m_browser.expired())
00162         return FB::FBVoid();
00163 
00164     NpapiBrowserHostPtr browser(getHost());
00165     if (!browser->isMainThread()) {
00166         return browser->CallOnMainThread(boost::bind((FB::GetPropertyType)&JSAPI::GetProperty, this, propertyName));
00167     }
00168     if (is_JSAPI) {
00169         FB::JSAPIPtr tmp = inner.lock();
00170         if (tmp)
00171             return tmp->GetProperty(propertyName);
00172         else 
00173             return false;
00174     }
00175     NPVariant retVal;
00176     if (!browser->GetProperty(obj, browser->GetStringIdentifier(propertyName.c_str()), &retVal)) {
00177         browser->ReleaseVariantValue(&retVal);
00178         throw script_error(propertyName.c_str());
00179     } else {
00180         FB::variant ret = browser->getVariant(&retVal);
00181         browser->ReleaseVariantValue(&retVal);
00182         return ret;
00183     }
00184 }

Here is the call graph for this function:


Generated on 19 Jun 2013 for FireBreath by  doxygen 1.6.1
Labels
  • None