Last Comment Bug 470510 - Investigate not clearing the inner window's scope on page transition (JS_ClearScope)
: Investigate not clearing the inner window's scope on page transition (JS_Clea...
: perf
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: x86 Linux
: -- normal with 1 vote (vote)
: ---
Assigned To: Ben Turner (not reading bugmail, use the needinfo flag!)
: Andrew Overholt [:overholt]
Depends on: 749371
  Show dependency treegraph
Reported: 2008-12-19 17:26 PST by Blake Kaplan (:mrbkap)
Modified: 2012-04-26 14:04 PDT (History)
24 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (3.03 KB, patch)
2008-12-19 17:26 PST, Blake Kaplan (:mrbkap)
no flags Details | Diff | Splinter Review
Leak dump (28.01 KB, text/plain)
2008-12-19 17:27 PST, Blake Kaplan (:mrbkap)
no flags Details
updated (4.41 KB, patch)
2009-11-02 08:33 PST, Blake Kaplan (:mrbkap)
peterv: review-
Details | Diff | Splinter Review

Description Blake Kaplan (:mrbkap) 2008-12-19 17:26:54 PST
Created attachment 353919 [details] [diff] [review]

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).
Comment 1 Blake Kaplan (:mrbkap) 2008-12-19 17:27:25 PST
Created attachment 353920 [details]
Leak dump
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2008-12-19 17:29:59 PST
Note that an additional worry is not just shutown leaks but window-lifetime or app-lifetime leaks...
Comment 3 Blake Kaplan (:mrbkap) 2009-11-02 08:33:27 PST
Created attachment 409699 [details] [diff] [review]

This doesn't leak when run against the tests in content/base, but does on the try server.
Comment 4 Benoit Jacob [:bjacob] (mostly away) 2011-05-13 07:43:49 PDT
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?
Comment 5 Benoit Jacob [:bjacob] (mostly away) 2011-05-13 07:45:15 PDT
[10:44] <__doc__> but it only appears if the mozRequestAnimationFrame is inside a conditional :)
Comment 6 Boris Zbarsky [:bz] (still a bit busy) 2011-05-13 08:11:50 PDT
Benoit, what build is that user using?
Comment 7 Benoit Jacob [:bjacob] (mostly away) 2011-05-13 08:18:08 PDT
He says Firefox 4.0.1 on Ubuntu 10.10.
Comment 8 Boris Zbarsky [:bz] (still a bit busy) 2011-05-13 08:20:21 PDT
Then he's seeing bug 607529; fixed in fx5.
Comment 9 Benoit Jacob [:bjacob] (mostly away) 2011-05-13 08:28:25 PDT
Excellent, thanks.
Comment 10 Peter Van der Beken [:peterv] 2011-05-17 02:56:03 PDT
Comment on attachment 409699 [details] [diff] [review]

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.
Comment 11 Alan Smith 2011-10-09 14:10:54 PDT
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!
Comment 12 Johnny Stenback (:jst, 2012-04-26 13:58:46 PDT
This is now fixed by peterv's work in bug 637099.

Note You need to log in before you can comment on or make changes to this bug.