summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsverrir@chromium.org <sverrir@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 16:05:18 +0000
committersverrir@chromium.org <sverrir@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 16:05:18 +0000
commitdfc00b4313bfe911b6b3ca7354e748315ca161c5 (patch)
tree8a7e0f2c5b26f7313b31beef96055d7b489eab50
parentb9d227497415e92048d88f676b395fc81d175598 (diff)
downloadchromium_src-dfc00b4313bfe911b6b3ca7354e748315ca161c5.zip
chromium_src-dfc00b4313bfe911b6b3ca7354e748315ca161c5.tar.gz
chromium_src-dfc00b4313bfe911b6b3ca7354e748315ca161c5.tar.bz2
Fix a crash where the security origin of the destination
is not initialized. Simply refusing access to prevent the crash. BUG=7330 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9479 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/port/bindings/v8/v8_proxy.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp
index 81c6e63..0042d12 100644
--- a/webkit/port/bindings/v8/v8_proxy.cpp
+++ b/webkit/port/bindings/v8/v8_proxy.cpp
@@ -2172,6 +2172,12 @@ bool V8Proxy::CanAccessPrivate(DOMWindow* target_window)
const SecurityOrigin* active_security_origin = origin_window->securityOrigin();
const SecurityOrigin* target_security_origin = target_window->securityOrigin();
+ // We have seen crashes were the security origin of the target has not been
+ // initialized. Defend against that.
+ ASSERT(target_security_origin);
+ if (!target_security_origin)
+ return false;
+
String ui_resource_protocol = ChromiumBridge::uiResourceProtocol();
if (active_security_origin->protocol() == ui_resource_protocol) {
KURL inspector_url = ChromiumBridge::inspectorURL();