mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 996280 - Use the docshell's sandbox flags if we can't get the active document in IsSandboxedFrom(). r=smaug
This commit is contained in:
parent
985067ff31
commit
64337e24f1
@ -3466,11 +3466,14 @@ nsDocShell::IsSandboxedFrom(nsIDocShell* aTargetDocShell)
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t sandboxFlags = 0;
|
||||
|
||||
nsCOMPtr<nsIDocument> doc = mContentViewer->GetDocument();
|
||||
if (doc) {
|
||||
sandboxFlags = doc->GetSandboxFlags();
|
||||
// Default the sandbox flags to our flags, so that if we can't retrieve the
|
||||
// active document, we will still enforce our own.
|
||||
uint32_t sandboxFlags = mSandboxFlags;
|
||||
if (mContentViewer) {
|
||||
nsCOMPtr<nsIDocument> doc = mContentViewer->GetDocument();
|
||||
if (doc) {
|
||||
sandboxFlags = doc->GetSandboxFlags();
|
||||
}
|
||||
}
|
||||
|
||||
// If no flags, we are not sandboxed at all.
|
||||
|
Loading…
Reference in New Issue
Block a user