зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1456652 - use triggering principal when leaving reader mode, r=mgoodwin
--HG-- extra : rebase_source : f3b86433b44551c75f0fc4f4d835fe07eb411efd
This commit is contained in:
Родитель
ef5f9b4b23
Коммит
b19e00359f
|
@ -130,7 +130,18 @@ var ReaderMode = {
|
|||
}
|
||||
}
|
||||
|
||||
win.document.location = originalURL;
|
||||
let referrerURI, principal;
|
||||
try {
|
||||
referrerURI = Services.io.newURI(url);
|
||||
principal = Services.scriptSecurityManager.createCodebasePrincipal(
|
||||
referrerURI, win.document.nodePrincipal.originAttributes);
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
return;
|
||||
}
|
||||
let flags = webNav.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL |
|
||||
webNav.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
|
||||
webNav.loadURI(originalURL, flags, referrerURI, null, null, principal);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче