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
    }
}
Esempio n. 2
0
 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);
}
Esempio n. 4
0
 static void didCollectException(const v8::WeakCallbackInfo<Message>& data) {
   data.GetParameter()->m_exception.clear();
 }
Esempio n. 5
0
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();
}
Esempio n. 7
0
 static void didCollectPromise(const v8::WeakCallbackInfo<Message>& data) {
   data.GetParameter()->m_collected = true;
   data.GetParameter()->m_promise.clear();
 }
Esempio n. 8
0
void FreeObject(const v8::WeakCallbackInfo<CJS_Object>& data) {
  CJS_Object* pJSObj = data.GetParameter();
  delete pJSObj;
  CFXJS_Engine::FreeObjectPrivate(data.GetInternalField(0));
}
Esempio n. 9
0
void DisposeObject(const v8::WeakCallbackInfo<CJS_Object>& data) {
  CJS_Object* pJSObj = data.GetParameter();
  pJSObj->Dispose();
  data.SetSecondPassCallback(FreeObject);
}
Esempio n. 10
0
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();
}
Esempio n. 12
0
static void derefCallback(const v8::WeakCallbackInfo<ScriptState>& data) {
  data.GetParameter()->deref();
}
Esempio n. 13
0
void V8AbstractEventListener::wrapperCleared(
    const v8::WeakCallbackInfo<V8AbstractEventListener>& data) {
    data.GetParameter()->clearListenerObject();
}
Esempio n. 14
0
void FreeObject(const v8::WeakCallbackInfo<CJS_Object>& data) {
  CJS_Object* pJSObj = data.GetParameter();
  pJSObj->ExitInstance();
  delete pJSObj;
  FXJS_FreePrivate(data.GetInternalField(0));
}
Esempio n. 15
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();
}