FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
JSAPIProxyPtr FB::JSAPIProxy::create ( const FB::JSAPIWeakPtr inner)
static

Creates a JSAPIProxy that holds a weak_ptr reference to the JSAPI object provided.

Parameters
innerthe API to reference; a reference to this API will be weak and when inner is released this object will throw an exception in response to any access except requests for the "expired" property, which is reserved in JSAPIProxy and will return true if inner has been released.
Returns
boost::shared_ptr<JSAPIProxy>
Since
1.4a3

Definition at line 31 of file JSAPIProxy.cpp.

32 {
33  // This is necessary because you can't use shared_from_this in the constructor
34  FB::JSAPIProxyPtr ptr(new FB::JSAPIProxy(inner));
35  FB::JSAPIImplPtr impl(FB::ptr_cast<JSAPIImpl>(inner.lock()));
36  if (impl)
37  impl->registerProxy(ptr);
38 
39  return ptr;
40 }
JavaScript API Wrapper – this can wrap any type of JSAPI object and be passed back to any browser tha...
Definition: JSAPIProxy.h:45