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