Sets the value of a property.
Implements FB::JSAPI. Definition at line 186 of file NPObjectAPI.cpp. References FB::JSAPI::SetProperty(). Referenced by SetProperty(). 00187 { 00188 if (m_browser.expired()) 00189 return; 00190 00191 NpapiBrowserHostPtr browser(getHost()); 00192 if (!browser->isMainThread()) { 00193 browser->CallOnMainThread(boost::bind((FB::SetPropertyType)&JSAPI::SetProperty, this, propertyName, value)); 00194 return; 00195 } 00196 if (is_JSAPI) { 00197 FB::JSAPIPtr tmp = inner.lock(); 00198 if (tmp) 00199 tmp->SetProperty(propertyName, value); 00200 return; 00201 } 00202 NPVariant val; 00203 browser->getNPVariant(&val, value); 00204 bool res = browser->SetProperty(obj, browser->GetStringIdentifier(propertyName.c_str()), &val); 00205 browser->ReleaseVariantValue(&val); 00206 if (!res) { 00207 throw script_error(propertyName.c_str()); 00208 } 00209 }
Here is the call graph for this function:
![]() |
Generated on 24 May 2013 for FireBreath by
1.6.1
Labels

