Investigate not clearing the inner window's scope on page transition (JS_ClearScope)

RESOLVED FIXED

Status

()

Core
DOM
RESOLVED FIXED
9 years ago
5 years ago

People

(Reporter: mrbkap, Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))

Tracking

({perf})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

9 years ago
Created attachment 353919 [details] [diff] [review]
Patch

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).
(Reporter)

Comment 1

9 years ago
Created attachment 353920 [details]
Leak dump
Note that an additional worry is not just shutown leaks but window-lifetime or app-lifetime leaks...
(Reporter)

Updated

8 years ago
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)

Updated

8 years ago
Component: Content → DOM
QA Contact: content → general
(Reporter)

Comment 3

8 years ago
Created attachment 409699 [details] [diff] [review]
updated

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.
Excellent, thanks.
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-

Comment 11

6 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Depends on: 749371
You need to log in before you can comment on or make changes to this bug.