[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

tony at chromium.org tony at chromium.org
Thu Oct 29 20:50:50 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit e31881b57d26d2c26dca21d5cf1429844a89b7c5
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 23 20:09:56 2009 +0000

    2009-10-23  Tony Chang  <tony at chromium.org>
    
            Reviewed by David Levin.
    
            Fix Chromium build after IsoldatedWorld change (r49963).
            https://bugs.webkit.org/show_bug.cgi?id=30719
    
            * bindings/ScriptControllerBase.cpp:
            * bindings/js/ScriptController.cpp:
            (WebCore::ScriptController::executeScriptInIsolatedWorld):
            * bindings/v8/ScriptController.cpp:
            (WebCore::mainThreadNormalWorld):
            * bindings/v8/ScriptController.h:
            (WebCore::ScriptController::windowShell):
            (WebCore::ScriptController::existingWindowShell):
            * dom/Document.cpp:
            (WebCore::Document::createWrapperCache):
            * dom/ScriptExecutionContext.cpp:
            * dom/ScriptExecutionContext.h:
            * xml/XMLHttpRequest.cpp:
            * xml/XMLHttpRequest.h:
    
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49992 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 79472de..8ea7653 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2009-10-23  Tony Chang  <tony at chromium.org>
+
+        Reviewed by David Levin.
+
+        Fix Chromium build after IsoldatedWorld change (r49963).
+        https://bugs.webkit.org/show_bug.cgi?id=30719
+
+        * bindings/ScriptControllerBase.cpp:
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::executeScriptInIsolatedWorld):
+        * bindings/v8/ScriptController.cpp:
+        (WebCore::mainThreadNormalWorld):
+        * bindings/v8/ScriptController.h:
+        (WebCore::ScriptController::windowShell):
+        (WebCore::ScriptController::existingWindowShell):
+        * dom/Document.cpp:
+        (WebCore::Document::createWrapperCache):
+        * dom/ScriptExecutionContext.cpp:
+        * dom/ScriptExecutionContext.h:
+        * xml/XMLHttpRequest.cpp:
+        * xml/XMLHttpRequest.h:
+
 2009-10-23  Xiaomei Ji  <xji at chromium.org>
 
         Reviewed by Sam Weinig.
diff --git a/WebCore/bindings/ScriptControllerBase.cpp b/WebCore/bindings/ScriptControllerBase.cpp
index 2d9eb02..c232e84 100644
--- a/WebCore/bindings/ScriptControllerBase.cpp
+++ b/WebCore/bindings/ScriptControllerBase.cpp
@@ -53,45 +53,6 @@ ScriptValue ScriptController::executeScript(const ScriptSourceCode& sourceCode)
     return result;
 }
 
-ScriptValue ScriptController::executeScriptInIsolatedWorld(unsigned worldID, const String& script, bool forceUserGesture)
-{
-    ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url());
-
-    if (!isEnabled() || isPaused())
-        return ScriptValue();
-
-    bool wasInExecuteScript = m_inExecuteScript;
-    m_inExecuteScript = true;
-
-    ScriptValue result = evaluateInIsolatedWorld(worldID, sourceCode);
-
-    if (!wasInExecuteScript) {
-        m_inExecuteScript = false;
-        Document::updateStyleForAllDocuments();
-    }
-
-    return result;
-}
-
-ScriptValue ScriptController::executeScriptInIsolatedWorld(DOMWrapperWorld* world, const String& script, bool forceUserGesture)
-{
-    ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url());
-
-    if (!isEnabled() || isPaused())
-        return ScriptValue();
-
-    bool wasInExecuteScript = m_inExecuteScript;
-    m_inExecuteScript = true;
-
-    ScriptValue result = evaluateInWorld(sourceCode, world);
-
-    if (!wasInExecuteScript) {
-        m_inExecuteScript = false;
-        Document::updateStyleForAllDocuments();
-    }
-
-    return result;
-}
 
 bool ScriptController::executeIfJavaScriptURL(const KURL& url, bool userGesture, bool replaceDocument)
 {
diff --git a/WebCore/bindings/js/ScriptController.cpp b/WebCore/bindings/js/ScriptController.cpp
index 5d65c11..ede6391 100644
--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -456,4 +456,44 @@ void ScriptController::clearScriptObjects()
 #endif
 }
 
+ScriptValue ScriptController::executeScriptInIsolatedWorld(unsigned worldID, const String& script, bool forceUserGesture)
+{
+    ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url());
+
+    if (!isEnabled() || isPaused())
+        return ScriptValue();
+
+    bool wasInExecuteScript = m_inExecuteScript;
+    m_inExecuteScript = true;
+
+    ScriptValue result = evaluateInIsolatedWorld(worldID, sourceCode);
+
+    if (!wasInExecuteScript) {
+        m_inExecuteScript = false;
+        Document::updateStyleForAllDocuments();
+    }
+
+    return result;
+}
+
+ScriptValue ScriptController::executeScriptInIsolatedWorld(DOMWrapperWorld* world, const String& script, bool forceUserGesture)
+{
+    ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url());
+
+    if (!isEnabled() || isPaused())
+        return ScriptValue();
+
+    bool wasInExecuteScript = m_inExecuteScript;
+    m_inExecuteScript = true;
+
+    ScriptValue result = evaluateInWorld(sourceCode, world);
+
+    if (!wasInExecuteScript) {
+        m_inExecuteScript = false;
+        Document::updateStyleForAllDocuments();
+    }
+
+    return result;
+}
+
 } // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptController.cpp b/WebCore/bindings/v8/ScriptController.cpp
index 493c43e..5e6b312 100644
--- a/WebCore/bindings/v8/ScriptController.cpp
+++ b/WebCore/bindings/v8/ScriptController.cpp
@@ -415,4 +415,10 @@ void ScriptController::updateDocument()
     m_proxy->updateDocument();
 }
 
+// FIXME: Stub method so we compile.  Currently called from FrameLoader.cpp.
+DOMWrapperWorld* mainThreadNormalWorld()
+{
+    return 0;
+}
+
 } // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptController.h b/WebCore/bindings/v8/ScriptController.h
index cd00713..c56d507 100644
--- a/WebCore/bindings/v8/ScriptController.h
+++ b/WebCore/bindings/v8/ScriptController.h
@@ -42,6 +42,7 @@
 #include <wtf/Vector.h>
 
 namespace WebCore {
+    class DOMWrapperWorld;
     class Event;
     class Frame;
     class HTMLPlugInElement;
@@ -90,14 +91,11 @@ namespace WebCore {
         // all DOM nodes and DOM constructors.
         void evaluateInNewContext(const Vector<ScriptSourceCode>&, int extensionGroup);
 
-        // JSC has a WindowShell object, but for V8, the ScriptController
-        // is the WindowShell.
-        bool haveWindowShell() const { return true; }
-
         // Masquerade 'this' as the windowShell.
         // This is a bit of a hack, but provides reasonable compatibility
         // with what JSC does as well.
-        ScriptController* windowShell() { return this; }
+        ScriptController* windowShell(DOMWrapperWorld*) { return this; }
+        ScriptController* existingWindowShell(DOMWrapperWorld*) { return this; }
 
         XSSAuditor* xssAuditor() { return m_XSSAuditor.get(); }
 
@@ -188,6 +186,8 @@ namespace WebCore {
         OwnPtr<XSSAuditor> m_XSSAuditor;
     };
 
+    DOMWrapperWorld* mainThreadNormalWorld();
+
 } // namespace WebCore
 
 #endif // ScriptController_h
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 5cf9140..78de69a 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -515,7 +515,9 @@ Document::JSWrapperCache* Document::createWrapperCache(DOMWrapperWorld* world)
 {
     JSWrapperCache* wrapperCache = new JSWrapperCache();
     m_wrapperCacheMap.set(world, wrapperCache);
+#if USE(JSC)
     world->rememberDocument(this);
+#endif
     return wrapperCache;
 }
 
diff --git a/WebCore/dom/ScriptExecutionContext.cpp b/WebCore/dom/ScriptExecutionContext.cpp
index db3f1bf..f7046e3 100644
--- a/WebCore/dom/ScriptExecutionContext.cpp
+++ b/WebCore/dom/ScriptExecutionContext.cpp
@@ -29,7 +29,6 @@
 
 #include "ActiveDOMObject.h"
 #include "Document.h"
-#include "JSDOMWindow.h"
 #include "MessagePort.h"
 #include "SecurityOrigin.h"
 #include "WorkerContext.h"
@@ -37,6 +36,10 @@
 #include <wtf/MainThread.h>
 #include <wtf/PassRefPtr.h>
 
+#if USE(JSC)
+#include "JSDOMWindow.h"
+#endif
+
 namespace WebCore {
 
 class ProcessMessagesSoonTask : public ScriptExecutionContext::Task {
@@ -196,6 +199,7 @@ ScriptExecutionContext::Task::~Task()
 {
 }
 
+#if USE(JSC)
 JSC::JSGlobalData* ScriptExecutionContext::globalData()
 {
      if (isDocument())
@@ -209,5 +213,6 @@ JSC::JSGlobalData* ScriptExecutionContext::globalData()
     ASSERT_NOT_REACHED();
     return 0;
 }
+#endif
 
 } // namespace WebCore
diff --git a/WebCore/dom/ScriptExecutionContext.h b/WebCore/dom/ScriptExecutionContext.h
index c6f0302..398afec 100644
--- a/WebCore/dom/ScriptExecutionContext.h
+++ b/WebCore/dom/ScriptExecutionContext.h
@@ -104,7 +104,9 @@ namespace WebCore {
         void removeTimeout(int timeoutId);
         DOMTimer* findTimeout(int timeoutId);
 
+#if USE(JSC)
         JSC::JSGlobalData* globalData();
+#endif
 
     protected:
         // Explicitly override the security origin for this script context.
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp
index 7536726..3c34baf 100644
--- a/WebCore/xml/XMLHttpRequest.cpp
+++ b/WebCore/xml/XMLHttpRequest.cpp
@@ -47,7 +47,9 @@
 #include <wtf/RefCountedLeakCounter.h>
 
 #if USE(JSC)
+#include "JSDOMBinding.h"
 #include "JSDOMWindow.h"
+#include <runtime/Protect.h>
 #endif
 
 namespace WebCore {
diff --git a/WebCore/xml/XMLHttpRequest.h b/WebCore/xml/XMLHttpRequest.h
index 078abb7..c7e0192 100644
--- a/WebCore/xml/XMLHttpRequest.h
+++ b/WebCore/xml/XMLHttpRequest.h
@@ -26,12 +26,10 @@
 #include "EventNames.h"
 #include "EventTarget.h"
 #include "FormData.h"
-#include "JSDOMBinding.h"
 #include "ResourceResponse.h"
 #include "ScriptString.h"
 #include "ThreadableLoaderClient.h"
 #include <wtf/OwnPtr.h>
-#include <runtime/Protect.h>
 
 namespace WebCore {
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list