Last Comment Bug 716033 - Move write barriers from jsapi.h to jsfriendapi.h
: Move write barriers from jsapi.h to jsfriendapi.h
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla12
Assigned To: [PTO to Dec5] Bill McCloskey (:billm)
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-06 13:11 PST by [PTO to Dec5] Bill McCloskey (:billm)
Modified: 2012-01-24 05:08 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (14.81 KB, patch)
2012-01-06 13:11 PST, [PTO to Dec5] Bill McCloskey (:billm)
luke: review+
bobbyholley: review+
Details | Diff | Splinter Review

Description [PTO to Dec5] Bill McCloskey (:billm) 2012-01-06 13:11:25 PST
Created attachment 586543 [details] [diff] [review]
patch

I no longer have much faith left that outside developers will be able to correctly implement write barriers. So this patch moves the API to jsfriendapi.h, and also simplifies it somewhat.

I also changed the SetProto barrier on XPCWrappedNative. Previously, the barrier used the existing tracing code to trace the wrapped native's proto. Now it uses a special write barrier call instead. The reason to do this is that it doesn't require a JSTracer. Requiring the runtime to have a JSTracer for XPConnect barriers is troublesome because of thread safety issues.

Most of these are JSAPI changes for Luke. Also asking for Bobby's review of the XPConnect changes.
Comment 1 [PTO to Dec5] Bill McCloskey (:billm) 2012-01-23 16:46:01 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/b1d7e7ac1b77
Comment 2 Marco Bonardo [::mak] 2012-01-24 05:08:28 PST
https://hg.mozilla.org/mozilla-central/rev/b1d7e7ac1b77

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