Closed Bug 470510 Opened 13 years ago Closed 9 years ago
Investigate not clearing the inner window's scope on page transition (JS
We've wanted to do this for a while (ever since the inner/outer window split) but have been afraid to do so because of leak possibilities. It turns out that we do leak, but we should be able to fix it. I'm attaching a patch that implements the core of this idea as well as changes to the makefile in content/base/test/ that, if you run with --test-path=content/base/test shows a leak of 5 nsGlobalWindows (I'll attach the full dump in a second).
Note that an additional worry is not just shutown leaks but window-lifetime or app-lifetime leaks...
Summary: Investigate not clearing the inner window's scope on page transition → Investigate not clearing the inner window's scope on page transition (JS_ClearScope)
This doesn't leak when run against the tests in content/base, but does on the try server.
Attachment #409699 - Flags: review?(peterv)
Ping... I have a user who's getting "attempted to run compile-and-go script on a cleared scope" and MXR points to this bug after a few hoops. [10:38] <__doc__> bjacob: btw. do you have any idea what the error "attempted to run compile-and-go script on a cleared scope" means? [10:39] <__doc__> bjacob: I only get it when I replace setTimeout with mozRequestAnimationFrame Looks like a patch here has been waiting for a review since 2009?
[10:44] <__doc__> but it only appears if the mozRequestAnimationFrame is inside a conditional :)
Benoit, what build is that user using?
He says Firefox 4.0.1 on Ubuntu 10.10.
Then he's seeing bug 607529; fixed in fx5.
Comment on attachment 409699 [details] [diff] [review] updated This patch hasn't been waiting for review but for me to debug the leaks. I've been doing that (see also bug 637099), but it's taking a long time.
Attachment #409699 - Flags: review?(peterv) → review-
I'm getting "attempt to run compile-and-go script on a cleared scope" in 7.0.1 on XP SP3 running GEPlugin. Happy to provide more info, but not sure how much detail is appropriate. error is reported from default.I.js: 41 - deep inside GEPlugin I think. I'm a js developer trying to get my app running in FF - it runs fine in Chrome!
This is now fixed by peterv's work in bug 637099.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.