mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1081856: Allow javascript urls to load in any process. r=mconley
--HG-- extra : rebase_source : 6c4e534d1fce84baaeff5abb08573dd1c0cb492d
This commit is contained in:
parent
fab8ec0afd
commit
7f897fc9f4
@ -484,6 +484,7 @@ skip-if = e10s # Bug 1100687 - test directly manipulates content (content.docume
|
||||
[browser_e10s_switchbrowser.js]
|
||||
[browser_e10s_about_process.js]
|
||||
[browser_e10s_chrome_process.js]
|
||||
[browser_e10s_javascript.js]
|
||||
[browser_blockHPKP.js]
|
||||
skip-if = e10s # bug 1100687 - test directly manipulates content (content.document.getElementById)
|
||||
[browser_mcb_redirect.js]
|
||||
|
11
browser/base/content/test/general/browser_e10s_javascript.js
Normal file
11
browser/base/content/test/general/browser_e10s_javascript.js
Normal file
@ -0,0 +1,11 @@
|
||||
const CHROME_PROCESS = Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
|
||||
const CONTENT_PROCESS = Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT;
|
||||
|
||||
add_task(function*() {
|
||||
let url = "javascript:dosomething()";
|
||||
|
||||
ok(E10SUtils.canLoadURIInProcess(url, CHROME_PROCESS),
|
||||
"Check URL in chrome process.");
|
||||
ok(E10SUtils.canLoadURIInProcess(url, CONTENT_PROCESS),
|
||||
"Check URL in content process.");
|
||||
});
|
@ -30,6 +30,10 @@ this.E10SUtils = {
|
||||
if (!aURL)
|
||||
aURL = "about:blank";
|
||||
|
||||
// Javascript urls can load in any process, they apply to the current document
|
||||
if (aURL.startsWith("javascript:"))
|
||||
return true;
|
||||
|
||||
let processIsRemote = aProcess == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT;
|
||||
|
||||
let canLoadRemote = true;
|
||||
|
Loading…
Reference in New Issue
Block a user