void V8AbstractEventListener::secondWeakCallback(const v8::WeakCallbackInfo<V8AbstractEventListener>& data) { if (data.GetParameter()->m_workerGlobalScope) { data.GetParameter()->m_workerGlobalScope->deregisterEventListener(data.GetParameter()); } else { #if ENABLE(OILPAN) data.GetParameter()->m_keepAlive.clear(); #else data.GetParameter()->deref(); #endif } }
static void onCollected(const v8::WeakCallbackInfo<ReadableStreamDataConsumerHandle::ReadingContext>& data) { data.GetParameter()->onCollected(); }
void V8AbstractEventListener::setWeakCallback(const v8::WeakCallbackInfo<V8AbstractEventListener>& data) { data.GetParameter()->m_listener.clear(); data.SetSecondPassCallback(secondWeakCallback); }
static void didCollectException(const v8::WeakCallbackInfo<Message>& data) { data.GetParameter()->m_exception.clear(); }
void DOMWrapperWorld::weakCallbackForDOMObjectHolder(const v8::WeakCallbackInfo<DOMObjectHolderBase>& data) { DOMObjectHolderBase* holderBase = data.GetParameter(); holderBase->world()->unregisterDOMObjectHolder(holderBase); }
static void weakCallback(const v8::WeakCallbackInfo<ScopedPersistent<T>>& data) { data.GetParameter()->clear(); }
static void didCollectPromise(const v8::WeakCallbackInfo<Message>& data) { data.GetParameter()->m_collected = true; data.GetParameter()->m_promise.clear(); }
void FreeObject(const v8::WeakCallbackInfo<CJS_Object>& data) { CJS_Object* pJSObj = data.GetParameter(); delete pJSObj; CFXJS_Engine::FreeObjectPrivate(data.GetInternalField(0)); }
void DisposeObject(const v8::WeakCallbackInfo<CJS_Object>& data) { CJS_Object* pJSObj = data.GetParameter(); pJSObj->Dispose(); data.SetSecondPassCallback(FreeObject); }
static void weakCallback(const v8::WeakCallbackInfo<ScriptState>& data) { data.GetParameter()->clearContext(); data.SetSecondPassCallback(derefCallback); }
static void clearHandle(const v8::WeakCallbackInfo<ScopedPersistent<v8::Object>>& data) { data.GetParameter()->clear(); }
static void derefCallback(const v8::WeakCallbackInfo<ScriptState>& data) { data.GetParameter()->deref(); }
void V8AbstractEventListener::wrapperCleared( const v8::WeakCallbackInfo<V8AbstractEventListener>& data) { data.GetParameter()->clearListenerObject(); }
void FreeObject(const v8::WeakCallbackInfo<CJS_Object>& data) { CJS_Object* pJSObj = data.GetParameter(); pJSObj->ExitInstance(); delete pJSObj; FXJS_FreePrivate(data.GetInternalField(0)); }
/** * Callback for V8 letting us know the JS object is no longer reachable. * Once we receive this callback we can shift from a strong to a weak Java reference * on the wrapped Java object so it can become eligible for GC. */ static void DetachCallback(const v8::WeakCallbackInfo<JavaObject>& data) { JavaObject* javaObject = data.GetParameter(); javaObject->detach(); }
void V8AbstractEventListener::setWeakCallback(const v8::WeakCallbackInfo<V8AbstractEventListener> &data) { data.GetParameter()->m_listener.clear(); data.GetParameter()->m_scriptStateForListener.clear(); }