Closed Bug 952183 Opened 11 years ago Closed 11 years ago

reuseGlobal doesn't account for scripts being recycled

Categories

(Core :: XPConnect, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: billm, Assigned: billm)

References

Details

Attachments

(1 file)

This seems like it's probably causing the issues in bug 673569. Gregor has kindly agreed to test.
Attachment #8350159 - Flags: feedback?(anygregor)
Comment on attachment 8350159 [details] [diff] [review]
table-script-recycling-fix

It works \o/. Please land asap.
Attachment #8350159 - Flags: feedback?(anygregor) → feedback+
Comment on attachment 8350159 [details] [diff] [review]
table-script-recycling-fix

Not sure who's around to review right now. Whoever gets to this first wins.

It sounds like Blake already figured this out. The problem was that scripts were getting collected, but they still remained in mThisObjects. Then FindTargetObject would get here:

http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/loader/mozJSComponentLoader.cpp#528

If the result of GetOutermostEnclosingFunctionOfScriptedCaller happened to have the same address as something that was in the table and then recycled, we would get the wrong target object.
Attachment #8350159 - Flags: review?(mrbkap)
Attachment #8350159 - Flags: review?(khuey)
Please land on mc directly so that travis can pick up the new build.
Attachment #8350159 - Flags: review?(khuey) → review+
Comment on attachment 8350159 [details] [diff] [review]
table-script-recycling-fix

I think I marked the wrong request as r=me... resetting this to khuey so he can look when he gets a chance.
Attachment #8350159 - Flags: review?(mrbkap) → review?(khuey)
Any sheriffs around that can land this on mc?
Flags: needinfo?(sheriffs)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: