[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

eric at webkit.org eric at webkit.org
Fri Feb 26 22:22:27 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 2102137c769cd0b3d68cc8e0abedfb7297757a34
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 17 10:21:27 2010 +0000

    2010-02-17  Steve Block  <steveblock at google.com>
    
            Reviewed by Ariya Hidayat.
    
            Adds missing platform and feature guards to V8 bindings
            https://bugs.webkit.org/show_bug.cgi?id=34987
    
            No new tests, build fix only.
    
            * bindings/v8/V8Proxy.cpp: Modified. Adds CHROMIUM guards and uses PlatformBridge in place of ChromiumBridge
            * bindings/v8/V8Proxy.h: Modified. Adds CHROMIUM guards and uses PlatformBridge in place of ChromiumBridge
            * bindings/v8/custom/V8DocumentCustom.cpp: Modified. Adds XPATH guards
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54881 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 788bf46..e4352fe 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,19 @@
 
         Reviewed by Ariya Hidayat.
 
+        Adds missing platform and feature guards to V8 bindings
+        https://bugs.webkit.org/show_bug.cgi?id=34987
+
+        No new tests, build fix only.
+
+        * bindings/v8/V8Proxy.cpp: Modified. Adds CHROMIUM guards and uses PlatformBridge in place of ChromiumBridge
+        * bindings/v8/V8Proxy.h: Modified. Adds CHROMIUM guards and uses PlatformBridge in place of ChromiumBridge
+        * bindings/v8/custom/V8DocumentCustom.cpp: Modified. Adds XPATH guards
+
+2010-02-17  Steve Block  <steveblock at google.com>
+
+        Reviewed by Ariya Hidayat.
+
         Include WebCore's npruntime.h for Android in V8 bindings
         https://bugs.webkit.org/show_bug.cgi?id=35002
 
diff --git a/WebCore/bindings/v8/V8Proxy.cpp b/WebCore/bindings/v8/V8Proxy.cpp
index c3a03b9..89bce4d 100644
--- a/WebCore/bindings/v8/V8Proxy.cpp
+++ b/WebCore/bindings/v8/V8Proxy.cpp
@@ -31,7 +31,6 @@
 #include "config.h"
 #include "V8Proxy.h"
 
-#include "ChromiumBridge.h"
 #include "CSSMutableStyleDeclaration.h"
 #include "DateExtension.h"
 #include "DOMObjectsInclude.h"
@@ -40,6 +39,7 @@
 #include "InspectorTimelineAgent.h"
 #include "Page.h"
 #include "PageGroup.h"
+#include "PlatformBridge.h"
 #include "ScriptController.h"
 #include "StorageNamespace.h"
 #include "V8Binding.h"
@@ -259,7 +259,9 @@ bool V8Proxy::handleOutOfMemory()
         proxy->windowShell()->destroyGlobal();
     }
 
-    ChromiumBridge::notifyJSOutOfMemory(frame);
+#if PLATFORM(CHROMIUM)
+    PlatformBridge::notifyJSOutOfMemory(frame);
+#endif
 
     // Disable JS.
     Settings* settings = frame->settings();
@@ -356,20 +358,26 @@ v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* nod
 
         // Compile the script.
         v8::Local<v8::String> code = v8ExternalString(source.source());
-        ChromiumBridge::traceEventBegin("v8.compile", node, "");
+#if PLATFORM(CHROMIUM)
+        PlatformBridge::traceEventBegin("v8.compile", node, "");
+#endif
 
         // NOTE: For compatibility with WebCore, ScriptSourceCode's line starts at
         // 1, whereas v8 starts at 0.
         v8::Handle<v8::Script> script = compileScript(code, source.url(), source.startLine() - 1);
-        ChromiumBridge::traceEventEnd("v8.compile", node, "");
+#if PLATFORM(CHROMIUM)
+        PlatformBridge::traceEventEnd("v8.compile", node, "");
 
-        ChromiumBridge::traceEventBegin("v8.run", node, "");
+        PlatformBridge::traceEventBegin("v8.run", node, "");
+#endif
         // Set inlineCode to true for <a href="javascript:doSomething()">
         // and false for <script>doSomething</script>. We make a rough guess at
         // this based on whether the script source has a URL.
         result = runScript(script, source.url().string().isNull());
     }
-    ChromiumBridge::traceEventEnd("v8.run", node, "");
+#if PLATFORM(CHROMIUM)
+    PlatformBridge::traceEventEnd("v8.run", node, "");
+#endif
 
 #if ENABLE(INSPECTOR)
     if (InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0)
diff --git a/WebCore/bindings/v8/V8Proxy.h b/WebCore/bindings/v8/V8Proxy.h
index cb02ee3..739fc86 100644
--- a/WebCore/bindings/v8/V8Proxy.h
+++ b/WebCore/bindings/v8/V8Proxy.h
@@ -31,7 +31,7 @@
 #ifndef V8Proxy_h
 #define V8Proxy_h
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "ScriptSourceCode.h" // for WebCore::ScriptSourceCode
 #include "SecurityOrigin.h" // for WebCore::SecurityOrigin
 #include "SharedPersistent.h"
@@ -44,8 +44,8 @@
 #include <wtf/PassRefPtr.h> // so generated bindings don't have to
 #include <wtf/Vector.h>
 
-#ifdef ENABLE_DOM_STATS_COUNTERS
-#define INC_STATS(name) ChromiumBridge::incrementStatsCounter(name)
+#if defined(ENABLE_DOM_STATS_COUNTERS) && PLATFORM(CHROMIUM)
+#define INC_STATS(name) PlatformBridge::incrementStatsCounter(name)
 #else
 #define INC_STATS(name)
 #endif
diff --git a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
index e744881..8968707 100644
--- a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
@@ -55,6 +55,7 @@
 
 namespace WebCore {
 
+#if ENABLE(XPATH)
 v8::Handle<v8::Value> V8Document::evaluateCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.Document.evaluate()");
@@ -85,6 +86,7 @@ v8::Handle<v8::Value> V8Document::evaluateCallback(const v8::Arguments& args)
 
     return toV8(result.release());
 }
+#endif
 
 v8::Handle<v8::Value> V8Document::getCSSCanvasContextCallback(const v8::Arguments& args)
 {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list