[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mpcomplete at chromium.org mpcomplete at chromium.org
Wed Dec 22 13:55:16 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f7779d71957ead376cd56e92419e9af92c13907c
Author: mpcomplete at chromium.org <mpcomplete at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 29 18:01:13 2010 +0000

    2010-09-29  Matt Perry  <mpcomplete at chromium.org>
    
            Reviewed by Darin Fisher.
    
            Remove obsolete registerExtension variants from chromium port.
            https://bugs.webkit.org/show_bug.cgi?id=46683
    
            * bindings/v8/V8DOMWindowShell.cpp:
            (WebCore::V8DOMWindowShell::createNewContext):
            * bindings/v8/V8Proxy.cpp:
            (WebCore::V8Proxy::registeredExtensionWithV8):
            (WebCore::V8Proxy::registerExtension):
            * bindings/v8/V8Proxy.h:
    2010-09-29  Matt Perry  <mpcomplete at chromium.org>
    
            Reviewed by Darin Fisher.
    
            Remove obsolete registerExtension variants from chromium port.
            https://bugs.webkit.org/show_bug.cgi?id=46683
    
            * public/WebScriptController.h:
            * src/WebScriptController.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68666 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index aedc75e..8ff170c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-29  Matt Perry  <mpcomplete at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        Remove obsolete registerExtension variants from chromium port.
+        https://bugs.webkit.org/show_bug.cgi?id=46683
+
+        * bindings/v8/V8DOMWindowShell.cpp:
+        (WebCore::V8DOMWindowShell::createNewContext):
+        * bindings/v8/V8Proxy.cpp:
+        (WebCore::V8Proxy::registeredExtensionWithV8):
+        (WebCore::V8Proxy::registerExtension):
+        * bindings/v8/V8Proxy.h:
+
 2010-09-29  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Chris Fleizach.
diff --git a/WebCore/bindings/v8/V8DOMWindowShell.cpp b/WebCore/bindings/v8/V8DOMWindowShell.cpp
index e2567a8..4bd4b42 100644
--- a/WebCore/bindings/v8/V8DOMWindowShell.cpp
+++ b/WebCore/bindings/v8/V8DOMWindowShell.cpp
@@ -330,30 +330,19 @@ v8::Persistent<v8::Context> V8DOMWindowShell::createNewContext(v8::Handle<v8::Ob
 
     // Used to avoid sleep calls in unload handlers.
     if (!V8Proxy::registeredExtensionWithV8(DateExtension::get()))
-        V8Proxy::registerExtension(DateExtension::get(), String());
+        V8Proxy::registerExtension(DateExtension::get());
 
     // Dynamically tell v8 about our extensions now.
     const V8Extensions& extensions = V8Proxy::extensions();
     OwnArrayPtr<const char*> extensionNames(new const char*[extensions.size()]);
     int index = 0;
     for (size_t i = 0; i < extensions.size(); ++i) {
-        if (extensions[i].group && extensions[i].group != extensionGroup)
+        // Ensure our date extension is always allowed.
+        if (extensions[i] != DateExtension::get()
+            && !m_frame->loader()->client()->allowScriptExtension(extensions[i]->name(), extensionGroup))
             continue;
 
-        if (extensions[i].useCallback) {
-            // Ensure our date extension is always allowed.
-            if (extensions[i].extension != DateExtension::get()
-                && !m_frame->loader()->client()->allowScriptExtension(extensions[i].extension->name(), extensionGroup))
-                continue;
-        } else {
-            // Note: we check the loader URL here instead of the document URL
-            // because we might be currently loading an URL into a blank page.
-            // See http://code.google.com/p/chromium/issues/detail?id=10924
-            if (extensions[i].scheme.length() > 0 && (extensions[i].scheme != m_frame->loader()->activeDocumentLoader()->url().protocol()))
-                continue;
-        }
-
-        extensionNames[index++] = extensions[i].extension->name();
+        extensionNames[index++] = extensions[i]->name();
     }
     v8::ExtensionConfiguration extensionConfiguration(index, extensionNames.get());
     result = v8::Context::New(&extensionConfiguration, globalTemplate, global);
diff --git a/WebCore/bindings/v8/V8Proxy.cpp b/WebCore/bindings/v8/V8Proxy.cpp
index 0a62079..f6535aa 100644
--- a/WebCore/bindings/v8/V8Proxy.cpp
+++ b/WebCore/bindings/v8/V8Proxy.cpp
@@ -828,32 +828,17 @@ void V8Proxy::registerExtensionWithV8(v8::Extension* extension)
 bool V8Proxy::registeredExtensionWithV8(v8::Extension* extension)
 {
     for (size_t i = 0; i < m_extensions.size(); ++i) {
-        if (m_extensions[i].extension == extension)
+        if (m_extensions[i] == extension)
             return true;
     }
 
     return false;
 }
 
-void V8Proxy::registerExtension(v8::Extension* extension, const String& schemeRestriction)
-{
-    registerExtensionWithV8(extension);
-    V8ExtensionInfo info = {schemeRestriction, 0, extension, false};
-    m_extensions.append(info);
-}
-
-void V8Proxy::registerExtension(v8::Extension* extension, int extensionGroup)
-{
-    registerExtensionWithV8(extension);
-    V8ExtensionInfo info = {String(), extensionGroup, extension, false};
-    m_extensions.append(info);
-}
-
 void V8Proxy::registerExtension(v8::Extension* extension)
 {
     registerExtensionWithV8(extension);
-    V8ExtensionInfo info = {String(), 0, extension, true};
-    m_extensions.append(info);
+    m_extensions.append(extension);
 }
 
 bool V8Proxy::setContextDebugId(int debugId)
diff --git a/WebCore/bindings/v8/V8Proxy.h b/WebCore/bindings/v8/V8Proxy.h
index 7f10a26..8a0da72 100644
--- a/WebCore/bindings/v8/V8Proxy.h
+++ b/WebCore/bindings/v8/V8Proxy.h
@@ -119,18 +119,8 @@ namespace WebCore {
 
     const int kMaxRecursionDepth = 20;
 
-    // Information about an extension that is registered for use with V8. If
-    // scheme is non-empty, it contains the URL scheme the extension should be
-    // used with. If group is non-zero, the extension will only be loaded into
-    // script contexts that belong to that group. Otherwise, the extension is
-    // used with all schemes and contexts.
-    struct V8ExtensionInfo {
-        String scheme;
-        int group;
-        v8::Extension* extension;
-        bool useCallback; // FIXME: remove
-    };
-    typedef WTF::Vector<V8ExtensionInfo> V8Extensions;
+    // The list of extensions that are registered for use with V8.
+    typedef WTF::Vector<v8::Extension*> V8Extensions;
 
     class V8Proxy {
     public:
@@ -320,19 +310,9 @@ namespace WebCore {
         bool setContextDebugId(int id);
         static int contextDebugId(v8::Handle<v8::Context>);
 
-        // Registers a v8 extension to be available on webpages. The two forms
-        // offer various restrictions on what types of contexts the extension is
-        // loaded into. If a scheme is provided, only pages whose URL has the given
-        // scheme will match. If extensionGroup is provided, the extension will
-        // only be loaded into scripts run via evaluateInNewWorld with the
-        // matching group.  Will only affect v8 contexts initialized after this
-        // call. Takes ownership of the v8::Extension object passed.
-        static void registerExtension(v8::Extension*, const String& schemeRestriction);
-        static void registerExtension(v8::Extension*, int extensionGroup);
-
-        // Same as above, but new version.
-        // FIXME: remove the other 2 versions in phase 3 of multipart checkin:
-        // https://bugs.webkit.org/show_bug.cgi?id=45721
+        // Registers a v8 extension to be available on webpages. Will only
+        // affect v8 contexts initialized after this call. Takes ownership of
+        // the v8::Extension object passed.
         static void registerExtension(v8::Extension*);
 
         static void registerExtensionWithV8(v8::Extension*);
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 458d7c3..cc725dc 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-29  Matt Perry  <mpcomplete at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        Remove obsolete registerExtension variants from chromium port.
+        https://bugs.webkit.org/show_bug.cgi?id=46683
+
+        * public/WebScriptController.h:
+        * src/WebScriptController.cpp:
+
 2010-09-29  Chris Guillory  <chris.guillory at google.com>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebKit/chromium/public/WebScriptController.h b/WebKit/chromium/public/WebScriptController.h
index 5c360b2..368f33d 100644
--- a/WebKit/chromium/public/WebScriptController.h
+++ b/WebKit/chromium/public/WebScriptController.h
@@ -51,12 +51,7 @@ public:
     // matching group.
     // Will only affect v8 contexts initialized after this call. Takes ownership
     // of the v8::Extension object passed.
-    // FIXME: remove the latter 2 versions in phase 3 of multipart checkin:
-    // https://bugs.webkit.org/show_bug.cgi?id=45721
     WEBKIT_API static void registerExtension(v8::Extension*);
-    WEBKIT_API static void registerExtension(v8::Extension*,
-                                             const WebString& schemeRestriction);
-    WEBKIT_API static void registerExtension(v8::Extension*, int extensionGroup);
 
     // Enables special settings which are only applicable if V8 is executed
     // in the single thread which must be the main thread.
diff --git a/WebKit/chromium/src/WebScriptController.cpp b/WebKit/chromium/src/WebScriptController.cpp
index 8877ba0..0aa11a6 100644
--- a/WebKit/chromium/src/WebScriptController.cpp
+++ b/WebKit/chromium/src/WebScriptController.cpp
@@ -46,18 +46,6 @@ void WebScriptController::registerExtension(v8::Extension* extension)
     V8Proxy::registerExtension(extension);
 }
 
-void WebScriptController::registerExtension(v8::Extension* extension,
-                                            const WebString& schemeRestriction)
-{
-    V8Proxy::registerExtension(extension, schemeRestriction);
-}
-
-void WebScriptController::registerExtension(v8::Extension* extension,
-                                            int extensionGroup)
-{
-    V8Proxy::registerExtension(extension, extensionGroup);
-}
-
 void WebScriptController::enableV8SingleThreadMode()
 {
     enableStringImplCache();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list