Skip to content

Commit

Permalink
Backed out 2 changesets (bug 1744352) for causing failures at test_ja…
Browse files Browse the repository at this point in the history
…vascript_sandboxed_popup.html. CLOSED TREE

Backed out changeset 1a7d29ce984c (bug 1744352)
Backed out changeset b3a8f99f0044 (bug 1744352)
  • Loading branch information
Butkovits Atila committed Feb 9, 2022
1 parent 4905393 commit 1d9c37d
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 42 deletions.
2 changes: 0 additions & 2 deletions docshell/base/BrowsingContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ enum class ExplicitActiveStatus : uint8_t {
FIELD(ShouldDelayMediaFromStart, bool) \
/* See nsSandboxFlags.h for the possible flags. */ \
FIELD(SandboxFlags, uint32_t) \
/* The value of SandboxFlags when the BrowsingContext is first created. \
* Used for sandboxing the initial about:blank document. */ \
FIELD(InitialSandboxFlags, uint32_t) \
/* A non-zero unique identifier for the browser element that is hosting \
* this \
Expand Down
5 changes: 0 additions & 5 deletions docshell/base/CanonicalBrowsingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,6 @@ void CanonicalBrowsingContext::ReplacedBy(
txn.SetExplicitActive(GetExplicitActive());
txn.SetHasRestoreData(GetHasRestoreData());
txn.SetShouldDelayMediaFromStart(GetShouldDelayMediaFromStart());
// As this is a different BrowsingContext, set InitialSandboxFlags to the
// current flags in the new context so that they also apply to any initial
// about:blank documents created in it.
txn.SetSandboxFlags(GetSandboxFlags());
txn.SetInitialSandboxFlags(GetSandboxFlags());
if (aNewContext->EverAttached()) {
MOZ_ALWAYS_SUCCEEDS(txn.Commit(aNewContext));
} else {
Expand Down
1 change: 0 additions & 1 deletion docshell/test/mochitest/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,3 @@ support-files =
clicker.html
double_submit.sjs
[test_iframe_srcdoc_to_remote.html]
[test_javascript_sandboxed_popup.html]
27 changes: 0 additions & 27 deletions docshell/test/mochitest/test_javascript_sandboxed_popup.html

This file was deleted.

5 changes: 0 additions & 5 deletions dom/jsurl/nsJSProtocolHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,6 @@ nsresult nsJSThunk::EvaluateScript(
// Sandboxed document check: javascript: URI execution is disabled
// in a sandboxed document unless 'allow-scripts' was specified.
if (targetDoc->HasScriptsBlockedBySandbox()) {
if (nsCOMPtr<nsIObserverService> obs =
mozilla::services::GetObserverService()) {
obs->NotifyWhenScriptSafe(ToSupports(innerWin),
"javascript-uri-blocked-by-sandbox");
}
return NS_ERROR_DOM_RETVAL_UNDEFINED;
}

Expand Down
2 changes: 0 additions & 2 deletions toolkit/components/windowwatcher/nsWindowWatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,6 @@ nsresult nsWindowWatcher::OpenWindowInternal(
SANDBOX_PROPAGATES_TO_AUXILIARY_BROWSING_CONTEXTS) {
MOZ_ASSERT(windowIsNew, "Should only get here for new windows");
MOZ_ALWAYS_SUCCEEDS(newBC->SetSandboxFlags(activeDocsSandboxFlags));
MOZ_ALWAYS_SUCCEEDS(
newBC->SetInitialSandboxFlags(newBC->GetSandboxFlags()));
}

RefPtr<nsGlobalWindowOuter> win(
Expand Down

0 comments on commit 1d9c37d

Please sign in to comment.