зеркало из https://github.com/mozilla/gecko-dev.git
Bug 611457 - Move the object which is supposed to survive the function's return out of the function so that a possible garbage collection doesn't collect it before it should be used; r=roc a=test-only
This commit is contained in:
Родитель
bdcb5e4f05
Коммит
4f5080cfa0
|
@ -100,14 +100,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=607584
|
|||
mEditor: null
|
||||
};
|
||||
|
||||
var progress;
|
||||
var progress, progressListener;
|
||||
|
||||
function runTest() {
|
||||
var newEditorElement = document.getElementById("editor");
|
||||
newEditorElement.makeEditable("html", true);
|
||||
var docShell = newEditorElement.boxObject.QueryInterface(Components.interfaces.nsIEditorBoxObject).docShell;
|
||||
progress = docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebProgress);
|
||||
var progressListener = new EditorContentListener(newEditorElement);
|
||||
progressListener = new EditorContentListener(newEditorElement);
|
||||
progress.addProgressListener(progressListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
|
||||
newEditorElement.setAttribute("src", "data:text/html,");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче