Changeset 142159 in webkit


Ignore:
Timestamp:
Feb 7, 2013 11:48:39 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[v8] move persistent::new and ::dispose into same class
https://bugs.webkit.org/show_bug.cgi?id=109065

Patch by Dan Carney <dcarney@google.com> on 2013-02-07
Reviewed by Adam Barth.

No new tests. No change in functionality.

  • bindings/scripts/CodeGeneratorV8.pm:

(GenerateSingleConstructorCallback):
(GenerateEventConstructorCallback):
(GenerateNamedConstructorCallback):
(GenerateToV8Converters):

  • bindings/scripts/test/V8/V8Float64Array.cpp:

(WebCore::V8Float64Array::createWrapper):

  • bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:

(WebCore::V8TestActiveDOMObject::createWrapper):

  • bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:

(WebCore::V8TestCustomNamedGetter::createWrapper):

  • bindings/scripts/test/V8/V8TestEventConstructor.cpp:

(WebCore::V8TestEventConstructor::constructorCallback):
(WebCore::V8TestEventConstructor::createWrapper):

  • bindings/scripts/test/V8/V8TestEventTarget.cpp:

(WebCore::V8TestEventTarget::createWrapper):

  • bindings/scripts/test/V8/V8TestException.cpp:

(WebCore::V8TestException::createWrapper):

  • bindings/scripts/test/V8/V8TestInterface.cpp:

(WebCore::V8TestInterface::constructorCallback):
(WebCore::V8TestInterface::createWrapper):

  • bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:

(WebCore::V8TestMediaQueryListListener::createWrapper):

  • bindings/scripts/test/V8/V8TestNamedConstructor.cpp:

(WebCore::V8TestNamedConstructorConstructorCallback):
(WebCore::V8TestNamedConstructor::createWrapper):

  • bindings/scripts/test/V8/V8TestNode.cpp:

(WebCore::V8TestNode::constructorCallback):
(WebCore::V8TestNode::createWrapper):

  • bindings/scripts/test/V8/V8TestObj.cpp:

(WebCore::V8TestObj::constructorCallback):
(WebCore::V8TestObj::createWrapper):

  • bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:

(WebCore::V8TestOverloadedConstructors::constructor1Callback):
(WebCore::V8TestOverloadedConstructors::constructor2Callback):
(WebCore::V8TestOverloadedConstructors::constructor3Callback):
(WebCore::V8TestOverloadedConstructors::constructor4Callback):
(WebCore::V8TestOverloadedConstructors::createWrapper):

  • bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:

(WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
(WebCore::V8TestSerializedScriptValueInterface::createWrapper):

  • bindings/v8/DOMDataStore.cpp:
  • bindings/v8/DOMDataStore.h:

(WebCore::DOMDataStore::setWrapper):
(DOMDataStore):
(WebCore::DOMDataStore::set):
(WebCore::DOMDataStore::setWrapperInObject):

  • bindings/v8/DOMWrapperMap.h:

(WebCore::DOMWrapperMap::get):
(WebCore::DOMWrapperMap::set):
(WebCore::DOMWrapperMap::removeAndDispose):
(WebCore::DOMWrapperMap::defaultWeakCallback):

  • bindings/v8/ScriptWrappable.h:

(WebCore::ScriptWrappable::wrapper):
(WebCore::ScriptWrappable::setWrapper):
(WebCore::ScriptWrappable::reportMemoryUsage):
(ScriptWrappable):
(WebCore::ScriptWrappable::disposeWrapper):
(WebCore::ScriptWrappable::weakCallback):

  • bindings/v8/V8DOMWindowShell.cpp:

(WebCore::V8DOMWindowShell::installDOMWindow):

  • bindings/v8/V8DOMWrapper.h:

(V8DOMWrapper):
(WebCore::V8DOMWrapper::associateObjectWithWrapper):

  • bindings/v8/V8NPObject.cpp:

(WebCore::weakNPObjectCallback):
(WebCore::createV8ObjectForNPObject):
(WebCore::forgetV8ObjectForNPObject):

  • bindings/v8/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initializeContextIfNeeded):

  • bindings/v8/WrapperTypeInfo.h:

(WebCore):
(WrapperConfiguration):
(WebCore::WrapperConfiguration::configureWrapper):
(WebCore::buildWrapperConfiguration):

  • bindings/v8/custom/V8ArrayBufferCustom.cpp:

(WebCore::V8ArrayBuffer::constructorCallbackCustom):

  • bindings/v8/custom/V8ArrayBufferViewCustom.h:

(WebCore::wrapArrayBufferView):
(WebCore::constructWebGLArray):

  • bindings/v8/custom/V8AudioContextCustom.cpp:

(WebCore::V8AudioContext::constructorCallbackCustom):

  • bindings/v8/custom/V8DOMFormDataCustom.cpp:

(WebCore::V8DOMFormData::constructorCallbackCustom):

  • bindings/v8/custom/V8DataViewCustom.cpp:

(WebCore::V8DataView::constructorCallbackCustom):

  • bindings/v8/custom/V8HTMLImageElementConstructor.cpp:

(WebCore::v8HTMLImageElementConstructorCallback):

  • bindings/v8/custom/V8IntentCustom.cpp:

(WebCore::V8Intent::constructorCallbackCustom):

  • bindings/v8/custom/V8MessageChannelCustom.cpp:

(WebCore::V8MessageChannel::constructorCallbackCustom):

  • bindings/v8/custom/V8MutationObserverCustom.cpp:

(WebCore::V8MutationObserver::constructorCallbackCustom):

  • bindings/v8/custom/V8WebKitPointCustom.cpp:

(WebCore::V8WebKitPoint::constructorCallbackCustom):

  • bindings/v8/custom/V8XMLHttpRequestCustom.cpp:

(WebCore::V8XMLHttpRequest::constructorCallbackCustom):

Location:
trunk/Source/WebCore
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142158 r142159  
     12013-02-07  Dan Carney  <dcarney@google.com>
     2
     3        [v8] move persistent::new and ::dispose into same class
     4        https://bugs.webkit.org/show_bug.cgi?id=109065
     5
     6        Reviewed by Adam Barth.
     7
     8        No new tests. No change in functionality.
     9
     10        * bindings/scripts/CodeGeneratorV8.pm:
     11        (GenerateSingleConstructorCallback):
     12        (GenerateEventConstructorCallback):
     13        (GenerateNamedConstructorCallback):
     14        (GenerateToV8Converters):
     15        * bindings/scripts/test/V8/V8Float64Array.cpp:
     16        (WebCore::V8Float64Array::createWrapper):
     17        * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
     18        (WebCore::V8TestActiveDOMObject::createWrapper):
     19        * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
     20        (WebCore::V8TestCustomNamedGetter::createWrapper):
     21        * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
     22        (WebCore::V8TestEventConstructor::constructorCallback):
     23        (WebCore::V8TestEventConstructor::createWrapper):
     24        * bindings/scripts/test/V8/V8TestEventTarget.cpp:
     25        (WebCore::V8TestEventTarget::createWrapper):
     26        * bindings/scripts/test/V8/V8TestException.cpp:
     27        (WebCore::V8TestException::createWrapper):
     28        * bindings/scripts/test/V8/V8TestInterface.cpp:
     29        (WebCore::V8TestInterface::constructorCallback):
     30        (WebCore::V8TestInterface::createWrapper):
     31        * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
     32        (WebCore::V8TestMediaQueryListListener::createWrapper):
     33        * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
     34        (WebCore::V8TestNamedConstructorConstructorCallback):
     35        (WebCore::V8TestNamedConstructor::createWrapper):
     36        * bindings/scripts/test/V8/V8TestNode.cpp:
     37        (WebCore::V8TestNode::constructorCallback):
     38        (WebCore::V8TestNode::createWrapper):
     39        * bindings/scripts/test/V8/V8TestObj.cpp:
     40        (WebCore::V8TestObj::constructorCallback):
     41        (WebCore::V8TestObj::createWrapper):
     42        * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
     43        (WebCore::V8TestOverloadedConstructors::constructor1Callback):
     44        (WebCore::V8TestOverloadedConstructors::constructor2Callback):
     45        (WebCore::V8TestOverloadedConstructors::constructor3Callback):
     46        (WebCore::V8TestOverloadedConstructors::constructor4Callback):
     47        (WebCore::V8TestOverloadedConstructors::createWrapper):
     48        * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
     49        (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
     50        (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
     51        * bindings/v8/DOMDataStore.cpp:
     52        * bindings/v8/DOMDataStore.h:
     53        (WebCore::DOMDataStore::setWrapper):
     54        (DOMDataStore):
     55        (WebCore::DOMDataStore::set):
     56        (WebCore::DOMDataStore::setWrapperInObject):
     57        * bindings/v8/DOMWrapperMap.h:
     58        (WebCore::DOMWrapperMap::get):
     59        (WebCore::DOMWrapperMap::set):
     60        (WebCore::DOMWrapperMap::removeAndDispose):
     61        (WebCore::DOMWrapperMap::defaultWeakCallback):
     62        * bindings/v8/ScriptWrappable.h:
     63        (WebCore::ScriptWrappable::wrapper):
     64        (WebCore::ScriptWrappable::setWrapper):
     65        (WebCore::ScriptWrappable::reportMemoryUsage):
     66        (ScriptWrappable):
     67        (WebCore::ScriptWrappable::disposeWrapper):
     68        (WebCore::ScriptWrappable::weakCallback):
     69        * bindings/v8/V8DOMWindowShell.cpp:
     70        (WebCore::V8DOMWindowShell::installDOMWindow):
     71        * bindings/v8/V8DOMWrapper.h:
     72        (V8DOMWrapper):
     73        (WebCore::V8DOMWrapper::associateObjectWithWrapper):
     74        * bindings/v8/V8NPObject.cpp:
     75        (WebCore::weakNPObjectCallback):
     76        (WebCore::createV8ObjectForNPObject):
     77        (WebCore::forgetV8ObjectForNPObject):
     78        * bindings/v8/WorkerScriptController.cpp:
     79        (WebCore::WorkerScriptController::initializeContextIfNeeded):
     80        * bindings/v8/WrapperTypeInfo.h:
     81        (WebCore):
     82        (WrapperConfiguration):
     83        (WebCore::WrapperConfiguration::configureWrapper):
     84        (WebCore::buildWrapperConfiguration):
     85        * bindings/v8/custom/V8ArrayBufferCustom.cpp:
     86        (WebCore::V8ArrayBuffer::constructorCallbackCustom):
     87        * bindings/v8/custom/V8ArrayBufferViewCustom.h:
     88        (WebCore::wrapArrayBufferView):
     89        (WebCore::constructWebGLArray):
     90        * bindings/v8/custom/V8AudioContextCustom.cpp:
     91        (WebCore::V8AudioContext::constructorCallbackCustom):
     92        * bindings/v8/custom/V8DOMFormDataCustom.cpp:
     93        (WebCore::V8DOMFormData::constructorCallbackCustom):
     94        * bindings/v8/custom/V8DataViewCustom.cpp:
     95        (WebCore::V8DataView::constructorCallbackCustom):
     96        * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
     97        (WebCore::v8HTMLImageElementConstructorCallback):
     98        * bindings/v8/custom/V8IntentCustom.cpp:
     99        (WebCore::V8Intent::constructorCallbackCustom):
     100        * bindings/v8/custom/V8MessageChannelCustom.cpp:
     101        (WebCore::V8MessageChannel::constructorCallbackCustom):
     102        * bindings/v8/custom/V8MutationObserverCustom.cpp:
     103        (WebCore::V8MutationObserver::constructorCallbackCustom):
     104        * bindings/v8/custom/V8WebKitPointCustom.cpp:
     105        (WebCore::V8WebKitPoint::constructorCallbackCustom):
     106        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
     107        (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
     108
    11092013-02-07  Zan Dobersek  <zdobersek@igalia.com>
    2110
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r142061 r142159  
    19651965    push(@implContent, <<END);
    19661966
    1967     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     1967    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    19681968    return wrapper;
    19691969END
     
    20402040
    20412041    v8::Handle<v8::Object> wrapper = args.Holder();
    2042     V8DOMWrapper::associateObjectWithWrapper(event.release(), &info, wrapper, args.GetIsolate());
     2042    V8DOMWrapper::associateObjectWithWrapper(event.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    20432043    return wrapper;
    20442044}
     
    21812181    push(@implContent, <<END);
    21822182
    2183     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &${v8InterfaceName}Constructor::info, wrapper, args.GetIsolate());
     2183    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &${v8InterfaceName}Constructor::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    21842184    return wrapper;
    21852185END
     
    35373537
    35383538    installPerContextProperties(wrapper, impl.get(), isolate);
    3539     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    3540     if (!hasDependentLifetime)
    3541         wrapperHandle.MarkIndependent();
     3539    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    35423540    return wrapper;
    35433541}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp

    r142061 r142159  
    181181
    182182    installPerContextProperties(wrapper, impl.get(), isolate);
    183     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    184     if (!hasDependentLifetime)
    185         wrapperHandle.MarkIndependent();
     183    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    186184    return wrapper;
    187185}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp

    r142061 r142159  
    208208
    209209    installPerContextProperties(wrapper, impl.get(), isolate);
    210     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    211     if (!hasDependentLifetime)
    212         wrapperHandle.MarkIndependent();
     210    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    213211    return wrapper;
    214212}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp

    r142061 r142159  
    146146
    147147    installPerContextProperties(wrapper, impl.get(), isolate);
    148     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    149     if (!hasDependentLifetime)
    150         wrapperHandle.MarkIndependent();
     148    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    151149    return wrapper;
    152150}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp

    r142061 r142159  
    104104
    105105    v8::Handle<v8::Object> wrapper = args.Holder();
    106     V8DOMWrapper::associateObjectWithWrapper(event.release(), &info, wrapper, args.GetIsolate());
     106    V8DOMWrapper::associateObjectWithWrapper(event.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    107107    return wrapper;
    108108}
     
    178178
    179179    installPerContextProperties(wrapper, impl.get(), isolate);
    180     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    181     if (!hasDependentLifetime)
    182         wrapperHandle.MarkIndependent();
     180    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    183181    return wrapper;
    184182}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp

    r142061 r142159  
    212212
    213213    installPerContextProperties(wrapper, impl.get(), isolate);
    214     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    215     if (!hasDependentLifetime)
    216         wrapperHandle.MarkIndependent();
     214    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    217215    return wrapper;
    218216}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp

    r142061 r142159  
    137137
    138138    installPerContextProperties(wrapper, impl.get(), isolate);
    139     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    140     if (!hasDependentLifetime)
    141         wrapperHandle.MarkIndependent();
     139    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    142140    return wrapper;
    143141}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp

    r142061 r142159  
    274274        goto fail;
    275275
    276     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     276    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    277277    return wrapper;
    278278  fail:
     
    367367
    368368    installPerContextProperties(wrapper, impl.get(), isolate);
    369     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    370     if (!hasDependentLifetime)
    371         wrapperHandle.MarkIndependent();
     369    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    372370    return wrapper;
    373371}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp

    r142061 r142159  
    146146
    147147    installPerContextProperties(wrapper, impl.get(), isolate);
    148     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    149     if (!hasDependentLifetime)
    150         wrapperHandle.MarkIndependent();
     148    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    151149    return wrapper;
    152150}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp

    r142061 r142159  
    9393        goto fail;
    9494
    95     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestNamedConstructorConstructor::info, wrapper, args.GetIsolate());
     95    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestNamedConstructorConstructor::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    9696    return wrapper;
    9797  fail:
     
    185185
    186186    installPerContextProperties(wrapper, impl.get(), isolate);
    187     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    188     if (!hasDependentLifetime)
    189         wrapperHandle.MarkIndependent();
     187    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    190188    return wrapper;
    191189}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp

    r142061 r142159  
    7676    v8::Handle<v8::Object> wrapper = args.Holder();
    7777
    78     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     78    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    7979    return wrapper;
    8080}
     
    150150
    151151    installPerContextProperties(wrapper, impl.get(), isolate);
    152     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    153     if (!hasDependentLifetime)
    154         wrapperHandle.MarkIndependent();
     152    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    155153    return wrapper;
    156154}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp

    r142061 r142159  
    20912091    v8::Handle<v8::Object> wrapper = args.Holder();
    20922092
    2093     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     2093    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    20942094    return wrapper;
    20952095}
     
    22922292
    22932293    installPerContextProperties(wrapper, impl.get(), isolate);
    2294     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    2295     if (!hasDependentLifetime)
    2296         wrapperHandle.MarkIndependent();
     2294    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    22972295    return wrapper;
    22982296}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp

    r142061 r142159  
    7777    v8::Handle<v8::Object> wrapper = args.Holder();
    7878
    79     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     79    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    8080    return wrapper;
    8181}
     
    8989    v8::Handle<v8::Object> wrapper = args.Holder();
    9090
    91     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     91    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    9292    return wrapper;
    9393}
     
    101101    v8::Handle<v8::Object> wrapper = args.Holder();
    102102
    103     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     103    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    104104    return wrapper;
    105105}
     
    113113    v8::Handle<v8::Object> wrapper = args.Holder();
    114114
    115     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     115    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    116116    return wrapper;
    117117}
     
    201201
    202202    installPerContextProperties(wrapper, impl.get(), isolate);
    203     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    204     if (!hasDependentLifetime)
    205         wrapperHandle.MarkIndependent();
     203    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    206204    return wrapper;
    207205}
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp

    r142061 r142159  
    247247    v8::Handle<v8::Object> wrapper = args.Holder();
    248248
    249     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     249    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    250250    return wrapper;
    251251}
     
    319319
    320320    installPerContextProperties(wrapper, impl.get(), isolate);
    321     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate);
    322     if (!hasDependentLifetime)
    323         wrapperHandle.MarkIndependent();
     321    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
    324322    return wrapper;
    325323}
  • trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp

    r141771 r142159  
    8181}
    8282
    83 void DOMDataStore::weakCallback(v8::Isolate* isolate, v8::Persistent<v8::Value> value, void* context)
    84 {
    85     ScriptWrappable* key = static_cast<ScriptWrappable*>(context);
    86     ASSERT(value->IsObject());
    87     v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(value);
    88     ASSERT(key->wrapper() == wrapper);
    89     // Note: |object| might not be equal to |key|, e.g., if ScriptWrappable isn't a left-most base class.
    90     void* object = toNative(wrapper);
    91     WrapperTypeInfo* info = toWrapperTypeInfo(wrapper);
    92     ASSERT(info->derefObjectFunction);
    93 
    94     key->clearWrapper();
    95     value.Dispose();
    96     value.Clear();
    97     // FIXME: I noticed that 50%~ of minor GC cycle times can be consumed
    98     // inside key->deref(), which causes Node destructions. We should
    99     // make Node destructions incremental.
    100     info->derefObject(object);
    101 }
    102 
    10383} // namespace WebCore
  • trunk/Source/WebCore/bindings/v8/DOMDataStore.h

    r142103 r142159  
    9090
    9191    template<typename T>
    92     static void setWrapper(T* object, v8::Persistent<v8::Object> wrapper, v8::Isolate* isolate)
     92    static void setWrapper(T* object, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, const WrapperConfiguration& configuration)
    9393    {
    9494        if (mainWorldWrapperIsStoredInObject(object) && isMainWorldObject(object)) {
    9595            if (LIKELY(!DOMWrapperWorld::isolatedWorldsExist())) {
    96                 setWrapperInObject(object, wrapper, isolate);
     96                setWrapperInObject(object, wrapper, isolate, configuration);
    9797                return;
    9898            }
    9999        }
    100         return current(isolate)->set(object, wrapper, isolate);
     100        return current(isolate)->set(object, wrapper, isolate, configuration);
    101101    }
    102102
     
    109109    }
    110110
     111    void reportMemoryUsage(MemoryObjectInfo*) const;
     112
     113private:
    111114    template<typename T>
    112     inline void set(T* object, v8::Persistent<v8::Object> wrapper, v8::Isolate* isolate)
     115    inline void set(T* object, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, const WrapperConfiguration& configuration)
    113116    {
    114117        ASSERT(!!object);
    115118        ASSERT(!wrapper.IsEmpty());
    116119        if (mainWorldWrapperIsStoredInObject(object) && m_type == MainWorld) {
    117             setWrapperInObject(object, wrapper, isolate);
     120            setWrapperInObject(object, wrapper, isolate, configuration);
    118121            return;
    119122        }
    120         m_wrapperMap.set(object, wrapper);
     123        m_wrapperMap.set(object, wrapper, configuration);
    121124    }
    122125
    123     void reportMemoryUsage(MemoryObjectInfo*) const;
    124 
    125 private:
    126126    static DOMDataStore* mainWorldStore();
    127127
     
    155155    }
    156156
    157     static void setWrapperInObject(void*, v8::Persistent<v8::Object>, v8::Isolate*)
     157    static void setWrapperInObject(void*, v8::Handle<v8::Object>, v8::Isolate*, const WrapperConfiguration&)
    158158    {
    159159        ASSERT_NOT_REACHED();
    160160    }
    161     static void setWrapperInObject(ScriptWrappable* object, v8::Persistent<v8::Object> wrapper, v8::Isolate* isolate)
     161    static void setWrapperInObject(ScriptWrappable* object, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, const WrapperConfiguration& configuration)
    162162    {
    163         ASSERT(object->wrapper().IsEmpty());
    164         object->setWrapper(wrapper);
    165         wrapper.MakeWeak(isolate, object, weakCallback);
     163        object->setWrapper(wrapper, isolate, configuration);
    166164    }
    167     static void setWrapperInObject(Node* object, v8::Persistent<v8::Object> wrapper, v8::Isolate* isolate)
     165    static void setWrapperInObject(Node* object, v8::Persistent<v8::Object> wrapper, v8::Isolate* isolate, const WrapperConfiguration& configuration)
    168166    {
    169         ASSERT(object->wrapper().IsEmpty());
    170         object->setWrapper(wrapper);
     167        object->setWrapper(wrapper, isolate, configuration);
    171168        V8GCController::didCreateWrapperForNode(object);
    172         wrapper.MakeWeak(isolate, static_cast<ScriptWrappable*>(object), weakCallback);
    173169    }
    174 
    175     static void weakCallback(v8::Isolate*, v8::Persistent<v8::Value>, void* context);
    176170
    177171    Type m_type;
  • trunk/Source/WebCore/bindings/v8/DOMWrapperMap.h

    r141771 r142159  
    5151    }
    5252
    53     v8::Persistent<v8::Object> get(KeyType* key)
     53    v8::Handle<v8::Object> get(KeyType* key)
    5454    {
    5555        return m_map.get(key);
    5656    }
    5757
    58     void set(KeyType* key, v8::Persistent<v8::Object> wrapper)
     58    void set(KeyType* key, v8::Handle<v8::Object> wrapper, const WrapperConfiguration& configuration)
    5959    {
    6060        ASSERT(!m_map.contains(key));
    6161        ASSERT(static_cast<KeyType*>(toNative(wrapper)) == key);
    62         wrapper.MakeWeak(m_isolate, this, m_callback);
    63         m_map.set(key, wrapper);
     62        v8::Persistent<v8::Object> persistent = v8::Persistent<v8::Object>::New(m_isolate, wrapper);
     63        configuration.configureWrapper(persistent, m_isolate);
     64        persistent.MakeWeak(m_isolate, this, m_callback);
     65        m_map.set(key, persistent);
    6466    }
    6567
     
    8284    }
    8385
    84     void remove(KeyType* key, v8::Persistent<v8::Object> wrapper)
     86    void removeAndDispose(KeyType* key, v8::Handle<v8::Object> value, v8::Isolate* isolate)
    8587    {
     88        v8::Persistent<v8::Object> wrapper(*value);
    8689        typename MapType::iterator it = m_map.find(key);
    8790        ASSERT(it != m_map.end());
    8891        ASSERT(it->value == wrapper);
    8992        m_map.remove(it);
     93        wrapper.Dispose(isolate);
     94        value.Clear();
    9095    }
    9196
     
    99104        ASSERT(type->derefObjectFunction);
    100105        KeyType* key = static_cast<KeyType*>(toNative(wrapper));
    101 
    102         map->remove(key, wrapper);
    103         wrapper.Dispose();
    104         wrapper.Clear();
     106        map->removeAndDispose(key, wrapper, isolate);
    105107        type->derefObject(key);
    106108    }
  • trunk/Source/WebCore/bindings/v8/ScriptWrappable.h

    r140575 r142159  
    3333
    3434#include "WebCoreMemoryInstrumentation.h"
     35#include "WrapperTypeInfo.h"
    3536#include <v8.h>
    3637
     
    4142    ScriptWrappable() { }
    4243
    43     v8::Persistent<v8::Object> wrapper() const
     44    v8::Handle<v8::Object> wrapper() const
    4445    {
    45         return v8::Persistent<v8::Object>(maskOrUnmaskPointer(*m_maskedWrapper));
     46        return v8::Handle<v8::Object>(maskOrUnmaskPointer(*m_maskedWrapper));
    4647    }
    4748
    48     void setWrapper(v8::Persistent<v8::Object> wrapper)
     49    void setWrapper(v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, const WrapperConfiguration& configuration)
    4950    {
    50         m_maskedWrapper = maskOrUnmaskPointer(*wrapper);
    51     }
    52 
    53     void clearWrapper()
    54     {
    55         ASSERT(!m_maskedWrapper.IsEmpty());
    56         m_maskedWrapper.Clear();
    57     }
    58 
    59     void disposeWrapper()
    60     {
    61         ASSERT(!m_maskedWrapper.IsEmpty());
    62         m_maskedWrapper = wrapper();
    63         m_maskedWrapper.Dispose();
    64         m_maskedWrapper.Clear();
     51        ASSERT(m_maskedWrapper.IsEmpty());
     52        v8::Persistent<v8::Object> persistent = v8::Persistent<v8::Object>::New(wrapper);
     53        configuration.configureWrapper(persistent, isolate);
     54        persistent.MakeWeak(isolate, this, weakCallback);
     55        m_maskedWrapper = maskOrUnmaskPointer(*persistent);
    6556    }
    6657
     
    7263
    7364private:
     65    inline void disposeWrapper(v8::Persistent<v8::Value> value)
     66    {
     67        ASSERT(!m_maskedWrapper.IsEmpty());
     68        ASSERT(*value == maskOrUnmaskPointer(*m_maskedWrapper));
     69        value.Dispose();
     70        m_maskedWrapper.Clear();
     71    }
     72
    7473    v8::Persistent<v8::Object> m_maskedWrapper;
    7574
     
    8079        return reinterpret_cast<v8::Object*>((objectPointer ^ randomMask) & (!objectPointer - 1)); // Preserve null without branching.
    8180    }
     81
     82    static void weakCallback(v8::Isolate* isolate, v8::Persistent<v8::Value> value, void* context)
     83    {
     84        ScriptWrappable* key = static_cast<ScriptWrappable*>(context);
     85        ASSERT(value->IsObject());
     86        v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(value);
     87        ASSERT(key->wrapper() == wrapper);
     88        key->disposeWrapper(value);
     89
     90        // Note: |object| might not be equal to |key|, e.g., if ScriptWrappable isn't a left-most base class.
     91        void* object = toNative(wrapper);
     92        WrapperTypeInfo* info = toWrapperTypeInfo(wrapper);
     93        ASSERT(info->derefObjectFunction);
     94
     95        // FIXME: I noticed that 50%~ of minor GC cycle times can be consumed
     96        // inside key->deref(), which causes Node destructions. We should
     97        // make Node destructions incremental.
     98        info->derefObject(object);
     99    }
    82100};
    83101
  • trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp

    r142103 r142159  
    336336    V8DOMWrapper::setNativeInfo(innerGlobalObject, &V8DOMWindow::info, window);
    337337    innerGlobalObject->SetPrototype(windowWrapper);
    338     V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<DOMWindow>(window), &V8DOMWindow::info, windowWrapper, m_isolate);
     338    V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<DOMWindow>(window), &V8DOMWindow::info, windowWrapper, m_isolate, WrapperConfiguration::Dependent);
    339339    return true;
    340340}
  • trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h

    r141977 r142159  
    5757
    5858        template<typename T>
    59         static inline v8::Persistent<v8::Object> associateObjectWithWrapper(PassRefPtr<T>, WrapperTypeInfo*, v8::Handle<v8::Object>, v8::Isolate*);
     59        static inline v8::Handle<v8::Object> associateObjectWithWrapper(PassRefPtr<T>, WrapperTypeInfo*, v8::Handle<v8::Object>, v8::Isolate*, WrapperConfiguration::Lifetime);
    6060        static inline void setNativeInfo(v8::Handle<v8::Object>, WrapperTypeInfo*, void*);
    6161        static inline void clearNativeInfo(v8::Handle<v8::Object>, WrapperTypeInfo*);
    62         static inline void setWrapperClass(void*, v8::Persistent<v8::Object>);
    63         static inline void setWrapperClass(Node*, v8::Persistent<v8::Object>);
    6462
    6563        static bool isDOMWrapper(v8::Handle<v8::Value>);
     
    6967        static void setNamedHiddenReference(v8::Handle<v8::Object> parent, const char* name, v8::Handle<v8::Value> child);
    7068    };
    71 
    72     inline void V8DOMWrapper::setWrapperClass(void*, v8::Persistent<v8::Object> wrapper)
    73     {
    74         wrapper.SetWrapperClassId(v8DOMObjectClassId);
    75     }
    76 
    77     inline void V8DOMWrapper::setWrapperClass(Node*, v8::Persistent<v8::Object> wrapper)
    78     {
    79         wrapper.SetWrapperClassId(v8DOMNodeClassId);
    80     }
    8169
    8270    inline void V8DOMWrapper::setNativeInfo(v8::Handle<v8::Object> wrapper, WrapperTypeInfo* type, void* object)
     
    9886
    9987    template<typename T>
    100     inline v8::Persistent<v8::Object> V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<T> object, WrapperTypeInfo* type, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate)
     88    inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<T> object, WrapperTypeInfo* type, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, WrapperConfiguration::Lifetime lifetime)
    10189    {
    10290        setNativeInfo(wrapper, type, object.get());
    103         v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
    104         ASSERT(maybeDOMWrapper(wrapperHandle));
    105         setWrapperClass(object.get(), wrapperHandle);
    106         DOMDataStore::setWrapper(object.leakRef(), wrapperHandle, isolate);
    107         return wrapperHandle;
     91        ASSERT(maybeDOMWrapper(wrapper));
     92        WrapperConfiguration configuration = buildWrapperConfiguration(object.get(), lifetime);
     93        DOMDataStore::setWrapper(object.leakRef(), wrapper, isolate, configuration);
     94        return wrapper;
    10895    }
    10996
  • trunk/Source/WebCore/bindings/v8/V8NPObject.cpp

    r141946 r142159  
    403403    // Must remove from our map before calling _NPN_ReleaseObject(). _NPN_ReleaseObject can
    404404    // call forgetV8ObjectForNPObject, which uses the table as well.
    405     staticNPObjectMap().remove(npObject, wrapper);
    406     wrapper.Dispose();
    407     wrapper.Clear();
     405    staticNPObjectMap().removeAndDispose(npObject, wrapper, isolate);
    408406
    409407    if (_NPN_IsAlive(npObject))
     
    449447
    450448    V8DOMWrapper::setNativeInfo(value, npObjectTypeInfo(), object);
    451     v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(value);
    452     V8DOMWrapper::setWrapperClass(object, wrapperHandle);
    453449
    454450    // KJS retains the object as part of its wrapper (see Bindings::CInstance).
     
    456452    _NPN_RegisterObject(object, root);
    457453
    458     staticNPObjectMap().set(object, wrapperHandle);
    459     ASSERT(V8DOMWrapper::maybeDOMWrapper(wrapperHandle));
     454    WrapperConfiguration configuration = buildWrapperConfiguration(object, WrapperConfiguration::Dependent);
     455    staticNPObjectMap().set(object, value, configuration);
     456    ASSERT(V8DOMWrapper::maybeDOMWrapper(value));
    460457    return value;
    461458}
     
    463460void forgetV8ObjectForNPObject(NPObject* object)
    464461{
    465     v8::Persistent<v8::Object> wrapper = staticNPObjectMap().get(object);
     462    v8::Handle<v8::Object> wrapper = staticNPObjectMap().get(object);
    466463    if (!wrapper.IsEmpty()) {
    467464        v8::HandleScope scope;
    468465        V8DOMWrapper::clearNativeInfo(wrapper, npObjectTypeInfo());
    469         staticNPObjectMap().remove(object, wrapper);
    470         wrapper.Dispose();
    471         wrapper.Clear();
     466        staticNPObjectMap().removeAndDispose(object, wrapper, v8::Isolate::GetCurrent());
    472467        _NPN_ReleaseObject(object);
    473468    }
  • trunk/Source/WebCore/bindings/v8/WorkerScriptController.cpp

    r141946 r142159  
    128128    }
    129129
    130     V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<WorkerContext>(m_workerContext), contextType, jsWorkerContext, m_isolate);
     130    V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<WorkerContext>(m_workerContext), contextType, jsWorkerContext, m_isolate, WrapperConfiguration::Dependent);
    131131
    132132    // Insert the object instance as the prototype of the shadow object.
  • trunk/Source/WebCore/bindings/v8/WrapperTypeInfo.h

    r142061 r142159  
    3939    class DOMDataStore;
    4040    class EventTarget;
     41    class Node;
    4142
    4243    static const int v8DOMWrapperTypeIndex = 0;
     
    142143    }
    143144
     145    struct WrapperConfiguration {
     146
     147        enum Lifetime {
     148            Dependent, Independent
     149        };
     150
     151        void configureWrapper(v8::Persistent<v8::Object> wrapper, v8::Isolate* isolate) const
     152        {
     153            wrapper.SetWrapperClassId(classId);
     154            if (lifetime == Independent)
     155                wrapper.MarkIndependent(isolate);
     156        }
     157
     158        const uint16_t classId;
     159        const Lifetime lifetime;
     160    };
     161
     162    inline WrapperConfiguration buildWrapperConfiguration(void*, WrapperConfiguration::Lifetime lifetime)
     163    {
     164        WrapperConfiguration configuration = {v8DOMObjectClassId, lifetime};
     165        return configuration;
     166    }
     167
     168    inline WrapperConfiguration buildWrapperConfiguration(Node*, WrapperConfiguration::Lifetime lifetime)
     169    {
     170        WrapperConfiguration configuration = {v8DOMNodeClassId, lifetime};
     171        return configuration;
     172    }
    144173}
    145174
  • trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp

    r139601 r142159  
    7777    // Transform the holder into a wrapper object for the array.
    7878    v8::Handle<v8::Object> wrapper = args.Holder();
    79     V8DOMWrapper::associateObjectWithWrapper(buffer.release(), &info, wrapper, args.GetIsolate());
     79    V8DOMWrapper::associateObjectWithWrapper(buffer.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    8080    return wrapper;
    8181}
  • trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h

    r141718 r142159  
    5656        args.Holder()->SetIndexedPropertiesToExternalArrayData(array.get()->baseAddress(), arrayType, array.get()->length());
    5757    v8::Handle<v8::Object> wrapper = args.Holder();
    58     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(array.release(), type, wrapper, args.GetIsolate());
    59     wrapperHandle.MarkIndependent();
     58    V8DOMWrapper::associateObjectWithWrapper(array.release(), type, wrapper, args.GetIsolate(), WrapperConfiguration::Independent);
    6059    return wrapper;
    6160}
     
    226225
    227226    v8::Handle<v8::Object> wrapper = args.Holder();
    228     v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(array.release(), type, wrapper, args.GetIsolate());
    229     wrapperHandle.MarkIndependent();
     227    V8DOMWrapper::associateObjectWithWrapper(array.release(), type, wrapper, args.GetIsolate(), WrapperConfiguration::Independent);
    230228    return wrapper;
    231229}
  • trunk/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp

    r139601 r142159  
    7474    // Transform the holder into a wrapper object for the audio context.
    7575    v8::Handle<v8::Object> wrapper = args.Holder();
    76     V8DOMWrapper::associateObjectWithWrapper(audioContext.release(), &info, wrapper, args.GetIsolate());
     76    V8DOMWrapper::associateObjectWithWrapper(audioContext.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    7777   
    7878    return wrapper;
  • trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp

    r141718 r142159  
    4848
    4949    v8::Handle<v8::Object> wrapper = args.Holder();
    50     V8DOMWrapper::associateObjectWithWrapper(domFormData.release(), &info, wrapper, args.GetIsolate());
     50    V8DOMWrapper::associateObjectWithWrapper(domFormData.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    5151    return wrapper;
    5252}
  • trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp

    r141718 r142159  
    4040        RefPtr<DataView> dataView = DataView::create(0);
    4141        v8::Handle<v8::Object> wrapper = args.Holder();
    42         V8DOMWrapper::associateObjectWithWrapper(dataView.release(), &info, wrapper, args.GetIsolate());
     42        V8DOMWrapper::associateObjectWithWrapper(dataView.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    4343        return wrapper;
    4444    }
  • trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp

    r140729 r142159  
    7878    RefPtr<HTMLImageElement> image = HTMLImageElement::createForJSConstructor(document, optionalWidth, optionalHeight);
    7979    v8::Handle<v8::Object> wrapper = args.Holder();
    80     V8DOMWrapper::associateObjectWithWrapper(image.release(), &V8HTMLImageElementConstructor::info, wrapper, args.GetIsolate());
     80    V8DOMWrapper::associateObjectWithWrapper(image.release(), &V8HTMLImageElementConstructor::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    8181    return wrapper;
    8282}
  • trunk/Source/WebCore/bindings/v8/custom/V8IntentCustom.cpp

    r141614 r142159  
    5858
    5959        v8::Handle<v8::Object> wrapper = args.Holder();
    60         V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     60        V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    6161        return wrapper;
    6262    }
     
    8181
    8282    v8::Handle<v8::Object> wrapper = args.Holder();
    83     V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
     83    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    8484    return wrapper;
    8585}
  • trunk/Source/WebCore/bindings/v8/custom/V8MessageChannelCustom.cpp

    r139601 r142159  
    5858    V8DOMWrapper::setNamedHiddenReference(wrapper, "port2", toV8(obj->port2(), args.Holder(), args.GetIsolate()));
    5959
    60     V8DOMWrapper::associateObjectWithWrapper(obj.release(), &info, wrapper, args.GetIsolate());
     60    V8DOMWrapper::associateObjectWithWrapper(obj.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    6161    return wrapper;
    6262}
  • trunk/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp

    r141771 r142159  
    5757    RefPtr<MutationObserver> observer = MutationObserver::create(callback.release());
    5858
    59     V8DOMWrapper::associateObjectWithWrapper(observer.release(), &info, wrapper, args.GetIsolate());
     59    V8DOMWrapper::associateObjectWithWrapper(observer.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    6060    return wrapper;
    6161}
  • trunk/Source/WebCore/bindings/v8/custom/V8WebKitPointCustom.cpp

    r139601 r142159  
    5858    RefPtr<WebKitPoint> point = WebKitPoint::create(x, y);
    5959    v8::Handle<v8::Object> wrapper = args.Holder();
    60     V8DOMWrapper::associateObjectWithWrapper(point.release(), &info, wrapper, args.GetIsolate());
     60    V8DOMWrapper::associateObjectWithWrapper(point.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    6161    return wrapper;
    6262}
  • trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp

    r141763 r142159  
    6262
    6363    v8::Handle<v8::Object> wrapper = args.Holder();
    64     V8DOMWrapper::associateObjectWithWrapper(xmlHttpRequest.release(), &info, wrapper, args.GetIsolate());
     64    V8DOMWrapper::associateObjectWithWrapper(xmlHttpRequest.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
    6565    return wrapper;
    6666}
Note: See TracChangeset for help on using the changeset viewer.