mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 837729 - don't create text-runs for JS source code loaded in a hidden-window iframe, and remove source text from the DOM as soon as we've extracted it. r=gavin,markh
This commit is contained in:
parent
206ac2e59c
commit
a26ae62acc
@ -202,6 +202,10 @@ FrameWorker.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
// now that we've got the script text, remove it from the DOM;
|
||||
// no need for it to keep occupying memory there
|
||||
workerWindow.document.body.textContent = "";
|
||||
|
||||
// the iframe has loaded the js file as text - first inject the magic
|
||||
// port-handling code into the sandbox.
|
||||
try {
|
||||
@ -316,6 +320,8 @@ function makeHiddenFrame() {
|
||||
iframe.setAttribute("mozframetype", "content");
|
||||
// allow-same-origin is necessary for localStorage to work in the sandbox.
|
||||
iframe.setAttribute("sandbox", "allow-same-origin");
|
||||
// don't create text frames and runs for the JS source!
|
||||
iframe.style.display = "none";
|
||||
|
||||
hiddenDoc.documentElement.appendChild(iframe);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user