Title: [134360] trunk/Source/WebCore
Revision
134360
Author
[email protected]
Date
2012-11-12 22:04:36 -0800 (Mon, 12 Nov 2012)

Log Message

[V8] V8DOMWrapper::instantiateV8Object shouldn't use deprecatedDocument
https://bugs.webkit.org/show_bug.cgi?id=102015

Reviewed by Kentaro Hara.

Previously, Nodes had a special path through
V8DOMWrapper::instantiateV8Object using deprecatedDocument so that we
could find the V8PerContextData quickly. Now that we can get the
V8PerContextData from the v8::Context quickly, we can move Nodes to the
general case. The net consequence is that creation of all DOM objects
should be as fast as Nodes are.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateToV8Converters):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::V8Float64Array::wrapSlow):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::V8TestActiveDOMObject::wrapSlow):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::wrapSlow):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::V8TestEventTarget::wrapSlow):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore::V8TestException::wrapSlow):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::wrapSlow):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::wrapSlow):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::wrapSlow):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::wrapSlow):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
(WebCore::V8TestOverloadedConstructors::wrapSlow):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
* bindings/v8/V8Binding.cpp:
* bindings/v8/V8Binding.h:
(WebCore):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::instantiateV8Object):
* bindings/v8/V8DOMWrapper.h:
(V8DOMWrapper):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134359 => 134360)


--- trunk/Source/WebCore/ChangeLog	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/ChangeLog	2012-11-13 06:04:36 UTC (rev 134360)
@@ -1,3 +1,53 @@
+2012-11-12  Adam Barth  <[email protected]>
+
+        [V8] V8DOMWrapper::instantiateV8Object shouldn't use deprecatedDocument
+        https://bugs.webkit.org/show_bug.cgi?id=102015
+
+        Reviewed by Kentaro Hara.
+
+        Previously, Nodes had a special path through
+        V8DOMWrapper::instantiateV8Object using deprecatedDocument so that we
+        could find the V8PerContextData quickly. Now that we can get the
+        V8PerContextData from the v8::Context quickly, we can move Nodes to the
+        general case. The net consequence is that creation of all DOM objects
+        should be as fast as Nodes are.
+
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateToV8Converters):
+        * bindings/scripts/test/V8/V8Float64Array.cpp:
+        (WebCore::V8Float64Array::wrapSlow):
+        * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
+        (WebCore::V8TestActiveDOMObject::wrapSlow):
+        * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
+        (WebCore::V8TestCustomNamedGetter::wrapSlow):
+        * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
+        (WebCore::V8TestEventConstructor::wrapSlow):
+        * bindings/scripts/test/V8/V8TestEventTarget.cpp:
+        (WebCore::V8TestEventTarget::wrapSlow):
+        * bindings/scripts/test/V8/V8TestException.cpp:
+        (WebCore::V8TestException::wrapSlow):
+        * bindings/scripts/test/V8/V8TestInterface.cpp:
+        (WebCore::V8TestInterface::wrapSlow):
+        * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
+        (WebCore::V8TestMediaQueryListListener::wrapSlow):
+        * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
+        (WebCore::V8TestNamedConstructor::wrapSlow):
+        * bindings/scripts/test/V8/V8TestNode.cpp:
+        (WebCore::V8TestNode::wrapSlow):
+        * bindings/scripts/test/V8/V8TestObj.cpp:
+        (WebCore::V8TestObj::wrapSlow):
+        * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
+        (WebCore::V8TestOverloadedConstructors::wrapSlow):
+        * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
+        (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
+        * bindings/v8/V8Binding.cpp:
+        * bindings/v8/V8Binding.h:
+        (WebCore):
+        * bindings/v8/V8DOMWrapper.cpp:
+        (WebCore::V8DOMWrapper::instantiateV8Object):
+        * bindings/v8/V8DOMWrapper.h:
+        (V8DOMWrapper):
+
 2012-11-12  KyungTae Kim  <[email protected]>
 
         Some CSS properties are not handled on StyleResolver::applyProperty

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-11-13 06:04:36 UTC (rev 134360)
@@ -3485,19 +3485,7 @@
     }
 
     push(@implContent, <<END);
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
-END
 
-    if (IsNodeSubType($dataNode)) {
-        push(@implContent, <<END);
-    deprecatedDocument = impl->document(); 
-END
-    }
-
-    push(@implContent, <<END);
-
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
         // For performance, we enter the context only if the currently running context
@@ -3507,7 +3495,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -150,9 +150,6 @@
 {
     v8::Handle<v8::Object> wrapper;
     ASSERT(static_cast<void*>(static_cast<ArrayBufferView*>(impl.get())) == static_cast<void*>(impl.get()));
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -163,7 +160,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -178,9 +178,6 @@
 v8::Handle<v8::Object> V8TestActiveDOMObject::wrapSlow(PassRefPtr<TestActiveDOMObject> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -191,7 +188,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -112,9 +112,6 @@
 v8::Handle<v8::Object> V8TestCustomNamedGetter::wrapSlow(PassRefPtr<TestCustomNamedGetter> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -125,7 +122,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -149,9 +149,6 @@
 v8::Handle<v8::Object> V8TestEventConstructor::wrapSlow(PassRefPtr<TestEventConstructor> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -162,7 +159,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -173,9 +173,6 @@
 v8::Handle<v8::Object> V8TestEventTarget::wrapSlow(PassRefPtr<TestEventTarget> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -186,7 +183,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -103,9 +103,6 @@
 v8::Handle<v8::Object> V8TestException::wrapSlow(PassRefPtr<TestException> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -116,7 +113,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -342,9 +342,6 @@
 v8::Handle<v8::Object> V8TestInterface::wrapSlow(PassRefPtr<TestInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -355,7 +352,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -112,9 +112,6 @@
 v8::Handle<v8::Object> V8TestMediaQueryListListener::wrapSlow(PassRefPtr<TestMediaQueryListListener> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -125,7 +122,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -152,9 +152,6 @@
 v8::Handle<v8::Object> V8TestNamedConstructor::wrapSlow(PassRefPtr<TestNamedConstructor> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -165,7 +162,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -112,10 +112,6 @@
 {
     v8::Handle<v8::Object> wrapper;
     ASSERT(static_cast<void*>(static_cast<Node*>(impl.get())) == static_cast<void*>(impl.get()));
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
-    deprecatedDocument = impl->document(); 
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -126,7 +122,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -2355,9 +2355,6 @@
 v8::Handle<v8::Object> V8TestObj::wrapSlow(PassRefPtr<TestObj> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -2368,7 +2365,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -176,9 +176,6 @@
 v8::Handle<v8::Object> V8TestOverloadedConstructors::wrapSlow(PassRefPtr<TestOverloadedConstructors> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -189,7 +186,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -295,9 +295,6 @@
 v8::Handle<v8::Object> V8TestSerializedScriptValueInterface::wrapSlow(PassRefPtr<TestSerializedScriptValueInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
 {
     v8::Handle<v8::Object> wrapper;
-    // Please don't add any more uses of this variable.
-    Document* deprecatedDocument = 0;
-    UNUSED_PARAM(deprecatedDocument);
 
     v8::Handle<v8::Context> context;
     if (!creationContext.IsEmpty() && creationContext->CreationContext() != v8::Context::GetCurrent()) {
@@ -308,7 +305,7 @@
         context->Enter();
     }
 
-    wrapper = V8DOMWrapper::instantiateV8Object(deprecatedDocument, &info, impl.get());
+    wrapper = V8DOMWrapper::instantiateV8Object(&info, impl.get());
 
     if (!context.IsEmpty())
         context->Exit();

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/v8/V8Binding.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -318,15 +318,6 @@
     return v8::Local<v8::Context>();
 }
 
-V8PerContextData* perContextDataForCurrentWorld(Frame* frame)
-{
-    V8DOMWindowShell* isolatedShell;
-    if (UNLIKELY(!!(isolatedShell = V8DOMWindowShell::getEntered())))
-        return isolatedShell->perContextData();
-    V8DOMWindowShell* mainShell = frame->script()->existingWindowShell(mainThreadNormalWorld());
-    return mainShell ? mainShell->perContextData() : 0;
-}
-
 bool handleOutOfMemory()
 {
     v8::Local<v8::Context> context = v8::Context::GetCurrent();

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (134359 => 134360)


--- trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-11-13 06:04:36 UTC (rev 134360)
@@ -379,9 +379,6 @@
     // a context, if the window is currently being displayed in the Frame.
     Frame* toFrameIfNotDetached(v8::Handle<v8::Context>);
 
-    // Returns the PerContextData associated with a frame for the current isolated world.
-    V8PerContextData* perContextDataForCurrentWorld(Frame*);
-
     // If the current context causes out of memory, _javascript_ setting
     // is disabled and it returns true.
     bool handleOutOfMemory();

Modified: trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp (134359 => 134360)


--- trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp	2012-11-13 06:04:36 UTC (rev 134360)
@@ -93,19 +93,9 @@
     return NodeFilter::create(V8NodeFilterCondition::create(filter));
 }
 
-v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(Document* deprecatedDocument, WrapperTypeInfo* type, void* impl)
+v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(WrapperTypeInfo* type, void* impl)
 {
-    V8PerContextData* perContextData = 0;
-
-    // Please don't add any more uses of deprecatedDocument. We want to remove it.
-
-    // If we have a pointer to the frame, we cna get the V8PerContextData
-    // directly, which is faster than going through V8.
-    if (deprecatedDocument && deprecatedDocument->frame())
-        perContextData = perContextDataForCurrentWorld(deprecatedDocument->frame());
-    else
-        perContextData = V8PerContextData::from(v8::Context::GetCurrent());
-
+    V8PerContextData* perContextData = V8PerContextData::from(v8::Context::GetCurrent());
     v8::Local<v8::Object> instance = perContextData ? perContextData->createWrapperFromCache(type) : V8ObjectConstructor::newInstance(type->getTemplate()->GetFunction());
 
     // Avoid setting the DOM wrapper for failed allocations.

Modified: trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h (134359 => 134360)


--- trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h	2012-11-13 05:53:43 UTC (rev 134359)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h	2012-11-13 06:04:36 UTC (rev 134360)
@@ -110,7 +110,7 @@
 
         static void setNamedHiddenReference(v8::Handle<v8::Object> parent, const char* name, v8::Handle<v8::Value> child);
 
-        static v8::Local<v8::Object> instantiateV8Object(Document*, WrapperTypeInfo*, void*);
+        static v8::Local<v8::Object> instantiateV8Object(WrapperTypeInfo*, void*);
 
         static v8::Handle<v8::Object> getCachedWrapper(Node* node)
         {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to