Last Comment Bug 534341 - XPConnect should not unroot globals of non-main thread contexts
: XPConnect should not unroot globals of non-main thread contexts
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla1.9.2
Assigned To: Peter Van der Beken [:peterv] - away till Aug 1st
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-11 16:45 PST by Peter Van der Beken [:peterv] - away till Aug 1st
Modified: 2010-01-27 17:25 PST (History)
7 users (show)
mbeltzner: blocking1.9.2+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
final-fixed
.8+
.8-fixed


Attachments
v1 (1.15 KB, patch)
2009-12-11 16:45 PST, Peter Van der Beken [:peterv] - away till Aug 1st
bent.mozilla: review+
jst: superreview+
Details | Diff | Splinter Review
v1 (735 bytes, patch)
2009-12-16 09:57 PST, Peter Van der Beken [:peterv] - away till Aug 1st
peterv: review+
peterv: superreview+
dveditz: approval1.9.1.8+
Details | Diff | Splinter Review

Description Peter Van der Beken [:peterv] - away till Aug 1st 2009-12-11 16:45:22 PST
Created attachment 417203 [details] [diff] [review]
v1

Since we don't cycle collect contexts that are not on the main thread.

We found this while running the test in bug 531225. Bent says this causes crashes (I killed it before it crashed).
Comment 1 Peter Van der Beken [:peterv] - away till Aug 1st 2009-12-14 10:54:10 PST
http://hg.mozilla.org/mozilla-central/rev/8f6bdbf8e701
Comment 2 Johnny Stenback (:jst, jst@mozilla.com) 2009-12-14 18:24:39 PST
Comment on attachment 417203 [details] [diff] [review]
v1

+    static inline JSBool IsMainThreadContext(JSContext *cx)
+    {
+        return cx->thread == sMainJSThread;
+    }

We already have IsMainThread(JSContext *cx), maybe just use that? :)

sr=jst with that.
Comment 3 Peter Van der Beken [:peterv] - away till Aug 1st 2009-12-15 11:12:35 PST
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/9cda2f6b9bb0
Comment 4 Peter Van der Beken [:peterv] - away till Aug 1st 2009-12-16 09:57:41 PST
Created attachment 417945 [details] [diff] [review]
v1
Comment 5 Daniel Veditz [:dveditz] 2009-12-16 16:55:22 PST
Comment on attachment 417945 [details] [diff] [review]
v1

Approved for 1.9.1.7, a=dveditz for release-drivers
Comment 6 Peter Van der Beken [:peterv] - away till Aug 1st 2009-12-17 16:47:58 PST
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/505f78dd66a4
Comment 7 Henrik Skupin (:whimboo) 2010-01-27 17:25:50 PST
Peter, any chance for QA to test this fix with a 3.5.8pre build? Do we have automated tests which cover code lines around the given patch and we can trust?

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