2009-11-30 Fumitoshi Ukai <ukai@chromium.org>
authorukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Dec 2009 03:33:00 +0000 (03:33 +0000)
committerukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Dec 2009 03:33:00 +0000 (03:33 +0000)
        Unreviewed Chromium build fix introduced by r51212

        Fix scriptStateFromNode and ScriptStateFromPage to take DOMWrapperWorld
        as the first argument.
        Move mainThreadNormalWorld() to ScriptState.{h,cpp}.
        Add debuggerWorld() and pluginWorld() in ScriptState.h.

        * bindings/v8/ScriptController.cpp:
        * bindings/v8/ScriptController.h:
        * bindings/v8/ScriptState.cpp:
        (WebCore::scriptStateFromNode):
        (WebCore::scriptStateFromPage):
        (WebCore::mainThreadNormalWorld):
        * bindings/v8/ScriptState.h:
        (WebCore::debuggerWorld):
        (WebCore::pluginWorld):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/bindings/v8/ScriptController.cpp
WebCore/bindings/v8/ScriptController.h
WebCore/bindings/v8/ScriptState.cpp
WebCore/bindings/v8/ScriptState.h

index 769717f..eb8feb6 100644 (file)
@@ -1,3 +1,22 @@
+2009-11-30  Fumitoshi Ukai  <ukai@chromium.org>
+
+        Unreviewed Chromium build fix introduced by r51212
+
+        Fix scriptStateFromNode and ScriptStateFromPage to take DOMWrapperWorld
+        as the first argument.
+        Move mainThreadNormalWorld() to ScriptState.{h,cpp}.
+        Add debuggerWorld() and pluginWorld() in ScriptState.h.
+
+        * bindings/v8/ScriptController.cpp:
+        * bindings/v8/ScriptController.h:
+        * bindings/v8/ScriptState.cpp:
+        (WebCore::scriptStateFromNode):
+        (WebCore::scriptStateFromPage):
+        (WebCore::mainThreadNormalWorld):
+        * bindings/v8/ScriptState.h:
+        (WebCore::debuggerWorld):
+        (WebCore::pluginWorld):
+
 2009-11-30  Enrica Casucci  <enrica@apple.com>
 
         Reviewed by Darin Adler.
index 9b55897..dd27dc9 100644 (file)
@@ -432,11 +432,4 @@ void ScriptController::updateDocument()
     m_proxy->updateDocument();
 }
 
-// FIXME: Stub method so we compile.  Currently called from FrameLoader.cpp.
-DOMWrapperWorld* mainThreadNormalWorld()
-{
-    DEFINE_STATIC_LOCAL(DOMWrapperWorld, oneWorld, ());
-    return &oneWorld;
-}
-
 } // namespace WebCore
index 0189faa..aa0e467 100644 (file)
@@ -194,12 +194,6 @@ namespace WebCore {
         OwnPtr<XSSAuditor> m_XSSAuditor;
     };
 
-    DOMWrapperWorld* mainThreadNormalWorld();
-
-    // Dummy class to avoid a bunch of ifdef's in WebCore.
-    class DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
-    };
-
 } // namespace WebCore
 
 #endif // ScriptController_h
index 99557b5..0b5cd08 100644 (file)
@@ -58,7 +58,7 @@ ScriptState::~ScriptState()
     m_context.Clear();
 }
 
-ScriptState* scriptStateFromNode(Node* node)
+ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node* node)
 {
     // This should be never reached with V8 bindings (WebKit only uses it
     // for non-JS bindings)
@@ -66,11 +66,18 @@ ScriptState* scriptStateFromNode(Node* node)
     return 0;
 }
 
-ScriptState* scriptStateFromPage(Page* page)
+ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page* page)
 {
     // This should be never reached with V8 bindings.
     ASSERT_NOT_REACHED();
     return 0;
 }
 
+// FIXME: Stub method so we compile.  Currently called from FrameLoader.cpp.
+DOMWrapperWorld* mainThreadNormalWorld()
+{
+    DEFINE_STATIC_LOCAL(DOMWrapperWorld, oneWorld, ());
+    return &oneWorld;
+}
+
 }
index e44e914..12a1388 100644 (file)
 
 #include <v8.h>
 #include <wtf/Noncopyable.h>
+#include <wtf/RefCounted.h>
 
 namespace WebCore {
+    class DOMWrapperWorld;
     class Node;
     class Page;
     class Frame;
@@ -65,8 +67,17 @@ namespace WebCore {
         v8::Persistent<v8::Context> m_context;
     };
 
-    ScriptState* scriptStateFromNode(Node*);
-    ScriptState* scriptStateFromPage(Page*);
+    ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node*);
+    ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page*);
+
+    DOMWrapperWorld* mainThreadNormalWorld();
+    inline DOMWrapperWorld* debuggerWorld() { return mainThreadNormalWorld(); }
+    inline DOMWrapperWorld* pluginWorld() { return mainThreadNormalWorld(); }
+
+    // Dummy class to avoid a bunch of ifdef's in WebCore.
+    class DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
+    };
+
 }
 
 #endif // ScriptState_h