File Information
Library: JS/Core
Package: Wrappers
Header: Poco/JS/Core/Wrapper.h
Description
Helper for wrapping native types in weak persistent handles.
Takes ownership of the native object and makes sure both the native object and the wrapping JS object are properly destroyed when garbage collected.
Inheritance
Direct Base Classes: WeakPersistentWrapperBase
All Base Classes: WeakPersistentWrapperBase
Member Summary
Member Functions: destruct, persistent
Constructors
WeakPersistentWrapper
WeakPersistentWrapper(
v8::Isolate * pIsolate,
const v8::Local < v8::Object > & jsObject,
T pNative
);
WeakPersistentWrapper
WeakPersistentWrapper(
v8::Isolate * pIsolate,
const v8::MaybeLocal < v8::Object > & maybeJSObject,
T pNative
);
Destructor
~WeakPersistentWrapper
Member Functions
destruct
static void destruct(
const v8::WeakCallbackInfo < WeakPersistentWrapper > & info
);
persistent
v8::Persistent < v8::Object > & persistent();