diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 20:01:17 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 20:01:17 +0000 |
commit | dacb10dd3adcd8bed394fef63657a0b8ad45ffe4 (patch) | |
tree | 8e35ad6fe9fa673d998f2beffe6a344815812414 | |
parent | 6475d6a97bdda96dc7f3a5d7f6aa1111e85f356f (diff) | |
download | chromium_src-dacb10dd3adcd8bed394fef63657a0b8ad45ffe4.zip chromium_src-dacb10dd3adcd8bed394fef63657a0b8ad45ffe4.tar.gz chromium_src-dacb10dd3adcd8bed394fef63657a0b8ad45ffe4.tar.bz2 |
When doing the scheme check for applying V8 extensions, check against the
activeDocumentLoader's url, not the document's current URL.
BUG=10924
Review URL: http://codereview.chromium.org/92090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14871 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index 01dd9a8..fa2a348 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -44,7 +44,7 @@ #include "ChromiumBridge.h" #include "DOMObjectsInclude.h" - +#include "DocumentLoader.h" #include "ScriptController.h" #include "V8DOMMap.h" @@ -1961,8 +1961,11 @@ v8::Persistent<v8::Context> V8Proxy::createNewContext( int index = 0; for (V8ExtensionList::iterator it = m_extensions.begin(); it != m_extensions.end(); ++it) { + // 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 (it->scheme.length() > 0 && - it->scheme != m_frame->document()->url().protocol()) + it->scheme != m_frame->loader()->activeDocumentLoader()->url().protocol()) continue; extensionNames[index++] = it->extension->name(); @@ -3168,7 +3171,7 @@ v8::Handle<v8::Value> V8Proxy::WindowToV8Object(DOMWindow* window) return v8::Handle<v8::Object>(); // Special case: Because of evaluateInNewContext() one DOMWindow can have - // multipe contexts and multiple global objects associated with it. When + // multiple contexts and multiple global objects associated with it. When // code running in one of those contexts accesses the window object, we // want to return the global object associated with that context, not // necessarily the first global object associated with that DOMWindow. |