Diff
Modified: trunk/Source/WebCore/ChangeLog (134566 => 134567)
--- trunk/Source/WebCore/ChangeLog 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/ChangeLog 2012-11-14 08:49:23 UTC (rev 134567)
@@ -1,3 +1,54 @@
+2012-11-14 Kentaro Hara <hara...@chromium.org>
+
+ [V8] Replace setDOMWrapper() + setJSWrapperForDOMObject() with createDOMWrapper()
+ https://bugs.webkit.org/show_bug.cgi?id=101917
+
+ Reviewed by Adam Barth.
+
+ setJSWrapperForDOMObject() is always coupled with setDOMWrapper().
+ We can replace setDOMWrapper() + setJSWrapperForDOMObject() with
+ createDOMWrapper(). (c.f. CREATE_DOM_WRAPPER() in JSC)
+
+ No tests. No change in behavior.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateConstructorCallback):
+ (GenerateEventConstructorCallback):
+ (GenerateNamedConstructorCallback):
+ (GenerateToV8Converters):
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::V8DOMWindowShell::installDOMWindow):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ * bindings/v8/V8DOMWrapper.h:
+ (V8DOMWrapper):
+ (WebCore::V8DOMWrapper::createDOMWrapper):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::initializeIfNeeded):
+ * bindings/v8/custom/V8ArrayBufferCustom.cpp:
+ (WebCore::V8ArrayBuffer::constructorCallback):
+ * bindings/v8/custom/V8ArrayBufferViewCustom.h:
+ (WebCore::wrapArrayBufferView):
+ (WebCore::constructWebGLArray):
+ * bindings/v8/custom/V8DOMFormDataCustom.cpp:
+ (WebCore::V8DOMFormData::constructorCallback):
+ * bindings/v8/custom/V8DataViewCustom.cpp:
+ (WebCore::V8DataView::constructorCallback):
+ * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+ (WebCore::v8HTMLImageElementConstructorCallback):
+ * bindings/v8/custom/V8IntentConstructor.cpp:
+ (WebCore::V8Intent::constructorCallback):
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::V8MessageChannel::constructorCallback):
+ * bindings/v8/custom/V8MutationObserverCustom.cpp:
+ (WebCore::V8MutationObserver::constructorCallback):
+ * bindings/v8/custom/V8WebKitPointConstructor.cpp:
+ (WebCore::V8WebKitPoint::constructorCallback):
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ (WebCore::V8WebSocket::constructorCallback):
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::V8XMLHttpRequest::constructorCallback):
+
2012-11-14 Kent Tamura <tk...@chromium.org>
Support for localization tests of calendar picker
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-11-14 08:49:23 UTC (rev 134567)
@@ -2019,8 +2019,7 @@
push(@implContent, <<END);
- V8DOMWrapper::setDOMWrapper(wrapper, &info, impl.get());
- V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper, args.GetIsolate());
+ V8DOMWrapper::createDOMWrapper(impl.release(), &info, wrapper, args.GetIsolate());
return wrapper;
END
@@ -2079,8 +2078,7 @@
RefPtr<${implClassName}> event = ${implClassName}::create(type, eventInit);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, event.get());
- V8DOMWrapper::setJSWrapperForDOMObject(event.release(), wrapper, args.GetIsolate());
+ V8DOMWrapper::createDOMWrapper(event.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
@@ -2220,8 +2218,7 @@
push(@implContent, <<END);
- V8DOMWrapper::setDOMWrapper(wrapper, &V8${implClassName}Constructor::info, impl.get());
- V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper, args.GetIsolate());
+ V8DOMWrapper::createDOMWrapper(impl.release(), &V8${implClassName}Constructor::info, wrapper, args.GetIsolate());
return wrapper;
END
@@ -3527,7 +3524,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -156,7 +156,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -185,7 +185,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -119,7 +119,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -85,8 +85,7 @@
RefPtr<TestEventConstructor> event = TestEventConstructor::create(type, eventInit);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, event.get());
- V8DOMWrapper::setJSWrapperForDOMObject(event.release(), wrapper, args.GetIsolate());
+ V8DOMWrapper::createDOMWrapper(event.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
@@ -156,7 +155,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -180,7 +180,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -110,7 +110,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -262,8 +262,7 @@
if (ec)
goto fail;
- V8DOMWrapper::setDOMWrapper(wrapper, &info, impl.get());
- V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper, args.GetIsolate());
+ V8DOMWrapper::createDOMWrapper(impl.release(), &info, wrapper, args.GetIsolate());
return wrapper;
fail:
return setDOMException(ec, args.GetIsolate());
@@ -349,7 +348,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -119,7 +119,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -71,8 +71,7 @@
if (ec)
goto fail;
- V8DOMWrapper::setDOMWrapper(wrapper, &V8TestNamedConstructorConstructor::info, impl.get());
- V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper, args.GetIsolate());
+ V8DOMWrapper::createDOMWrapper(impl.release(), &V8TestNamedConstructorConstructor::info, wrapper, args.GetIsolate());
return wrapper;
fail:
return setDOMException(ec, args.GetIsolate());
@@ -159,7 +158,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -53,8 +53,7 @@
RefPtr<TestNode> impl = TestNode::create();
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, impl.get());
- V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper, args.GetIsolate());
+ V8DOMWrapper::createDOMWrapper(impl.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
@@ -119,7 +118,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -2178,8 +2178,7 @@
RefPtr<TestObj> impl = TestObj::create(testCallback);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, impl.get());
- V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper, args.GetIsolate());
+ V8DOMWrapper::createDOMWrapper(impl.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
@@ -2362,7 +2361,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -233,8 +233,7 @@
RefPtr<TestSerializedScriptValueInterface> impl = TestSerializedScriptValueInterface::create(hello, data, messagePortArrayTransferList);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, impl.get());
- V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper, args.GetIsolate());
+ V8DOMWrapper::createDOMWrapper(impl.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
@@ -302,7 +301,7 @@
return wrapper;
installPerContextProperties(wrapper, impl.get());
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(impl, wrapper, isolate);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(impl, &info, wrapper, isolate);
if (!hasDependentLifetime)
wrapperHandle.MarkIndependent();
return wrapper;
Modified: trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -425,9 +425,8 @@
V8DOMWindow::installPerContextProperties(windowWrapper, window);
- V8DOMWrapper::setDOMWrapper(windowWrapper, &V8DOMWindow::info, window);
V8DOMWrapper::setDOMWrapper(v8::Handle<v8::Object>::Cast(windowWrapper->GetPrototype()), &V8DOMWindow::info, window);
- V8DOMWrapper::setJSWrapperForDOMObject(PassRefPtr<DOMWindow>(window), windowWrapper);
+ V8DOMWrapper::createDOMWrapper(PassRefPtr<DOMWindow>(window), &V8DOMWindow::info, windowWrapper);
// Install the windowWrapper as the prototype of the innerGlobalObject.
// The full structure of the global object is as follows:
Modified: trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -136,10 +136,8 @@
if (instance.IsEmpty())
return instance;
- setDOMWrapper(instance, type, impl);
if (type == &V8HTMLDocument::info)
instance = V8HTMLDocument::wrapInShadowObject(instance, static_cast<Node*>(impl));
-
return instance;
}
Modified: trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h 2012-11-14 08:49:23 UTC (rev 134567)
@@ -103,7 +103,7 @@
static PassRefPtr<NodeFilter> wrapNativeNodeFilter(v8::Handle<v8::Value>);
template<typename T>
- static v8::Persistent<v8::Object> setJSWrapperForDOMObject(PassRefPtr<T>, v8::Handle<v8::Object>, v8::Isolate* = 0);
+ static v8::Persistent<v8::Object> createDOMWrapper(PassRefPtr<T>, WrapperTypeInfo*, v8::Handle<v8::Object>, v8::Isolate* = 0);
// Check whether a V8 value is a wrapper of type |classType|.
static bool isWrapperOfType(v8::Handle<v8::Value>, WrapperTypeInfo*);
@@ -138,8 +138,9 @@
};
template<typename T>
- v8::Persistent<v8::Object> V8DOMWrapper::setJSWrapperForDOMObject(PassRefPtr<T> object, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate)
+ v8::Persistent<v8::Object> V8DOMWrapper::createDOMWrapper(PassRefPtr<T> object, WrapperTypeInfo* type, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate)
{
+ setDOMWrapper(wrapper, type, object.get());
v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
ASSERT(maybeDOMWrapper(wrapperHandle));
setWrapperClass(object.get(), wrapperHandle);
Modified: trunk/Source/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -170,10 +170,8 @@
}
// Wrap the object.
- V8DOMWrapper::setDOMWrapper(jsWorkerContext, contextType, m_workerContext);
+ V8DOMWrapper::createDOMWrapper(PassRefPtr<WorkerContext>(m_workerContext), contextType, jsWorkerContext);
- V8DOMWrapper::setJSWrapperForDOMObject(PassRefPtr<WorkerContext>(m_workerContext), jsWorkerContext);
-
// Insert the object instance as the prototype of the shadow object.
v8::Handle<v8::Object> globalObject = v8::Handle<v8::Object>::Cast(m_context->Global()->GetPrototype());
globalObject->SetPrototype(jsWorkerContext);
Modified: trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -84,8 +84,7 @@
v8::V8::AdjustAmountOfExternalAllocatedMemory(buffer->byteLength());
// Transform the holder into a wrapper object for the array.
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, buffer.get());
- V8DOMWrapper::setJSWrapperForDOMObject(buffer.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(buffer.release(), &info, wrapper);
return wrapper;
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h 2012-11-14 08:49:23 UTC (rev 134567)
@@ -51,12 +51,11 @@
v8::Handle<v8::Value> wrapArrayBufferView(const v8::Arguments& args, WrapperTypeInfo* type, ArrayClass array, v8::ExternalArrayType arrayType, bool hasIndexer)
{
// Transform the holder into a wrapper object for the array.
- V8DOMWrapper::setDOMWrapper(args.Holder(), type, array.get());
ASSERT(!hasIndexer || static_cast<int32_t>(array.get()->length()) >= 0);
if (hasIndexer)
args.Holder()->SetIndexedPropertiesToExternalArrayData(array.get()->baseAddress(), arrayType, array.get()->length());
v8::Handle<v8::Object> wrapper = args.Holder();
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(array.release(), wrapper);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(array.release(), type, wrapper);
wrapperHandle.MarkIndependent();
return wrapper;
}
@@ -204,7 +203,6 @@
// Transform the holder into a wrapper object for the array.
- V8DOMWrapper::setDOMWrapper(args.Holder(), type, array.get());
args.Holder()->SetIndexedPropertiesToExternalArrayData(array.get()->baseAddress(), arrayType, array.get()->length());
if (!srcArray.IsEmpty()) {
@@ -216,7 +214,7 @@
}
v8::Handle<v8::Object> wrapper = args.Holder();
- v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::setJSWrapperForDOMObject(array.release(), wrapper);
+ v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::createDOMWrapper(array.release(), type, wrapper);
wrapperHandle.MarkIndependent();
return wrapper;
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -55,8 +55,7 @@
RefPtr<DOMFormData> domFormData = DOMFormData::create(form);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, domFormData.get());
- V8DOMWrapper::setJSWrapperForDOMObject(domFormData.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(domFormData.release(), &info, wrapper);
return wrapper;
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -47,8 +47,7 @@
// 'new DataView()' and the call used to construct the cached DataView object.
RefPtr<DataView> dataView = DataView::create(0);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, dataView.get());
- V8DOMWrapper::setJSWrapperForDOMObject(dataView.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(dataView.release(), &info, wrapper);
return wrapper;
}
if (args[0]->IsNull() || !V8ArrayBuffer::HasInstance(args[0]))
Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -75,8 +75,8 @@
}
if (shadow.IsEmpty())
return v8::Local<v8::Object>();
- V8DOMWrapper::setDOMWrapper(shadow, &V8HTMLDocument::info, impl);
shadow->SetPrototype(wrapper);
+ V8DOMWrapper::setDOMWrapper(wrapper, &V8HTMLDocument::info, impl);
return shadow;
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -79,8 +79,7 @@
RefPtr<HTMLImageElement> image = HTMLImageElement::createForJSConstructor(document, optionalWidth, optionalHeight);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &V8HTMLImageElementConstructor::info, image.get());
- V8DOMWrapper::setJSWrapperForDOMObject(image.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(image.release(), &V8HTMLImageElementConstructor::info, wrapper);
return wrapper;
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8IntentConstructor.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8IntentConstructor.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8IntentConstructor.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -62,8 +62,7 @@
return setDOMException(ec, args.GetIsolate());
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, impl.get());
- V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(impl.release(), &info, wrapper);
return wrapper;
}
@@ -86,8 +85,7 @@
return setDOMException(ec, args.GetIsolate());
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, impl.get());
- V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(impl.release(), &info, wrapper);
return wrapper;
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -66,8 +66,7 @@
V8DOMWrapper::setNamedHiddenReference(wrapper, "port1", toV8(obj->port1(), args.Holder(), args.GetIsolate()));
V8DOMWrapper::setNamedHiddenReference(wrapper, "port2", toV8(obj->port2(), args.Holder(), args.GetIsolate()));
- V8DOMWrapper::setDOMWrapper(wrapper, &info, obj.get());
- V8DOMWrapper::setJSWrapperForDOMObject(obj.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(obj.release(), &info, wrapper);
return wrapper;
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -66,8 +66,7 @@
RefPtr<MutationObserver> observer = MutationObserver::create(callback.release());
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, observer.get());
- V8DOMWrapper::setJSWrapperForDOMObject(observer.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(observer.release(), &info, wrapper);
return wrapper;
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -65,8 +65,7 @@
}
RefPtr<WebKitPoint> point = WebKitPoint::create(x, y);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, point.get());
- V8DOMWrapper::setJSWrapperForDOMObject(point.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(point.release(), &info, wrapper);
return wrapper;
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp (134566 => 134567)
--- trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp 2012-11-14 08:43:26 UTC (rev 134566)
+++ trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp 2012-11-14 08:49:23 UTC (rev 134567)
@@ -61,8 +61,7 @@
RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, securityOrigin);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::setDOMWrapper(wrapper, &info, xmlHttpRequest.get());
- V8DOMWrapper::setJSWrapperForDOMObject(xmlHttpRequest.release(), wrapper);
+ V8DOMWrapper::createDOMWrapper(xmlHttpRequest.release(), &info, wrapper);
return wrapper;
}