summaryrefslogtreecommitdiffstats
path: root/ceee
diff options
context:
space:
mode:
authorericdingle@chromium.org <ericdingle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 22:46:02 +0000
committerericdingle@chromium.org <ericdingle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 22:46:02 +0000
commit73a0a4f60014aea2def83fdd02a708162c62d81a (patch)
treeca182fbada040f3d08d54ac4fb634f4e3b9c0488 /ceee
parente794238c487b065ea4091aa6f14105ba0eaf6080 (diff)
downloadchromium_src-73a0a4f60014aea2def83fdd02a708162c62d81a.zip
chromium_src-73a0a4f60014aea2def83fdd02a708162c62d81a.tar.gz
chromium_src-73a0a4f60014aea2def83fdd02a708162c62d81a.tar.bz2
IE CEEE: Wrap frameElement access in ceee_bootstrap.js to prevent access denied error.
BUG=none TEST=none Review URL: http://codereview.chromium.org/5122004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66530 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ceee')
-rw-r--r--ceee/ie/plugin/scripting/ceee_bootstrap.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ceee/ie/plugin/scripting/ceee_bootstrap.js b/ceee/ie/plugin/scripting/ceee_bootstrap.js
index 88388b3..1eb624a 100644
--- a/ceee/ie/plugin/scripting/ceee_bootstrap.js
+++ b/ceee/ie/plugin/scripting/ceee_bootstrap.js
@@ -152,7 +152,14 @@ ceee.initGlobals_ = function() {
top = unsafeWindow.top;
opener = unsafeWindow.opener;
parent = unsafeWindow.parent;
- frameElement = unsafeWindow.frameElement;
+ try {
+ // IE will throw an Access Denied error if the parent browsing context does
+ // not have the same effective script origin as the entry script. See:
+ // http://www.w3.org/TR/html5/browsers.html#dom-frameelement
+ // TODO(ericdingle@chromium.org): See if we can wrap this attribute with a
+ // getter so that we can mimic IE's behavior when it is accessed.
+ frameElement = unsafeWindow.frameElement;
+ } catch (e) {}
open = unsafeWindow.open;
// User agent.