diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp
index 7ba8ffedadc..b8209b0a0dc 100644
--- a/mozilla/content/html/document/src/nsHTMLDocument.cpp
+++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp
@@ -2060,8 +2060,18 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
return NS_OK;
}
- NS_ASSERTION(nsContentUtils::CanCallerAccess(static_cast(this)),
- "XOWs should have caught this!");
+ if (!nsContentUtils::CanCallerAccess(static_cast(this))) {
+ nsPIDOMWindow *win = GetWindow();
+ if (win) {
+ nsCOMPtr frameElement;
+ rv = win->GetFrameElement(getter_AddRefs(frameElement));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ if (frameElement && !nsContentUtils::CanCallerAccess(frameElement)) {
+ return NS_ERROR_DOM_SECURITY_ERR;
+ }
+ }
+ }
if (!aContentType.EqualsLiteral("text/html") &&
!aContentType.EqualsLiteral("text/plain")) {
diff --git a/mozilla/minimo/customization/all.js b/mozilla/minimo/customization/all.js
index 030ff9eb7cf..3aa4a49b791 100755
--- a/mozilla/minimo/customization/all.js
+++ b/mozilla/minimo/customization/all.js
@@ -113,6 +113,9 @@ pref("capability.policy.default.History.next", "UniversalBrowserRead");
pref("capability.policy.default.History.previous", "UniversalBrowserRead");
pref("capability.policy.default.History.toString", "UniversalBrowserRead");
+pref("capability.policy.default.HTMLDocument.close.get", "allAccess");
+pref("capability.policy.default.HTMLDocument.open.get", "allAccess");
+
pref("capability.policy.default.Location.hash.set", "allAccess");
pref("capability.policy.default.Location.href.set", "allAccess");
pref("capability.policy.default.Location.reload.get", "allAccess");
@@ -126,6 +129,7 @@ pref("capability.policy.default.Window.blur.get", "allAccess");
pref("capability.policy.default.Window.close.get", "allAccess");
pref("capability.policy.default.Window.closed.get", "allAccess");
pref("capability.policy.default.Window.Components", "allAccess");
+pref("capability.policy.default.Window.document.get", "allAccess");
pref("capability.policy.default.Window.focus.get", "allAccess");
pref("capability.policy.default.Window.frames.get", "allAccess");
pref("capability.policy.default.Window.history.get", "allAccess");
diff --git a/mozilla/modules/libpref/src/init/all.js b/mozilla/modules/libpref/src/init/all.js
index fc3d0ab7384..47c11697bf0 100644
--- a/mozilla/modules/libpref/src/init/all.js
+++ b/mozilla/modules/libpref/src/init/all.js
@@ -302,6 +302,8 @@ pref("capability.policy.default.History.next", "UniversalBrowserRead");
pref("capability.policy.default.History.previous", "UniversalBrowserRead");
pref("capability.policy.default.History.toString", "UniversalBrowserRead");
+pref("capability.policy.default.HTMLDocument.open.get", "allAccess");
+
pref("capability.policy.default.Location.hash.set", "allAccess");
pref("capability.policy.default.Location.href.set", "allAccess");
pref("capability.policy.default.Location.replace.get", "allAccess");
@@ -313,6 +315,7 @@ pref("capability.policy.default.Navigator.preferenceinternal.set", "UniversalPre
pref("capability.policy.default.Window.blur.get", "allAccess");
pref("capability.policy.default.Window.close.get", "allAccess");
pref("capability.policy.default.Window.closed.get", "allAccess");
+pref("capability.policy.default.Window.document.get", "allAccess");
pref("capability.policy.default.Window.focus.get", "allAccess");
pref("capability.policy.default.Window.frames.get", "allAccess");
pref("capability.policy.default.Window.history.get", "allAccess");