Closed
Bug 777219
Opened 12 years ago
Closed 12 years ago
Prepare for converting the JSAPI to JSObject handles
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: sfink, Assigned: terrence)
References
Details
(Whiteboard: [js:t])
Attachments
(6 files, 12 obsolete files)
2.54 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
110.13 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
174.83 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
70.37 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
4.25 KB,
text/plain
|
Details | |
411.21 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
As a step towards converting the JSAPI to use Handles everywhere necessary, I: step 1: converted (almost) all JSObject pointers to JSHandleObject or JSMutableHandleObject step 2: fixed up everything within SpiderMonkey that uses the public (or friend) API step 3: partially reverted the change to maintain compatibility with Gecko The end result is an unmodified JSAPI that properly roots everything, but it does the rooting just underneath the public API so that it will be straightforward to backout step 3 (all at once or incrementally) to have a fully handle-based JSAPI. Note that this is not a complete Handle-ification; it only does JSObject pointers. In particular, jsval/Value is not done. That will be the next step. I haven't decided whether to update the patches or add another similar series on top.
Reporter | ||
Comment 1•12 years ago
|
||
Reporter | ||
Comment 2•12 years ago
|
||
Reporter | ||
Comment 3•12 years ago
|
||
Reporter | ||
Comment 4•12 years ago
|
||
Reporter | ||
Comment 5•12 years ago
|
||
Reporter | ||
Comment 6•12 years ago
|
||
Attachment #646376 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #645627 -
Attachment is obsolete: true
Reporter | ||
Comment 7•12 years ago
|
||
Attachment #646377 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #645628 -
Attachment is obsolete: true
Reporter | ||
Comment 8•12 years ago
|
||
The changes in jsapi-tests are a little weird, so separating out. This must land together with patch 2, though, or it won't compile.
Attachment #646379 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #645629 -
Attachment is obsolete: true
Reporter | ||
Comment 9•12 years ago
|
||
Attachment #646381 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #645630 -
Attachment is obsolete: true
Reporter | ||
Comment 10•12 years ago
|
||
Attachment #646382 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #645631 -
Attachment is obsolete: true
Reporter | ||
Comment 11•12 years ago
|
||
Note that all jstests, jit-tests, and jsapi-tests pass after this patch series, or after just patches 1-3.
Reporter | ||
Comment 12•12 years ago
|
||
After reading billm's review of bug 776579, I updated the naming from obj_ => objArg.
Attachment #646416 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #646381 -
Attachment is obsolete: true
Attachment #646381 -
Flags: review?(bhackett1024)
Reporter | ||
Comment 13•12 years ago
|
||
...and rebased the manual portion on top.
Attachment #646417 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #646382 -
Attachment is obsolete: true
Attachment #646382 -
Flags: review?(bhackett1024)
Reporter | ||
Comment 14•12 years ago
|
||
Ug. Also note that my automatic api reversion script only caught things named JS_ something, so the browser (eg xpconnect) won't compile with this. I'll either have to make the script more flexible or manually revert several dozen things. Doh!
Updated•12 years ago
|
Whiteboard: [js:t]
Reporter | ||
Comment 15•12 years ago
|
||
Updated, mostly to add JSRawObject in more places discovered while getting things to build with the browser.
Attachment #646679 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #646377 -
Attachment is obsolete: true
Attachment #646377 -
Flags: review?(bhackett1024)
Reporter | ||
Comment 16•12 years ago
|
||
this probably didn't change much at all, but updating just in case.
Attachment #646681 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #646379 -
Attachment is obsolete: true
Attachment #646379 -
Flags: review?(bhackett1024)
Reporter | ||
Comment 17•12 years ago
|
||
Added a bunch of things in for jsfriendapi.h, which doesn't use a leading JS_ so I was missing it before. Note that this patch is generated automatically, and so shouldn't require much more than a cursory review.
Attachment #646682 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #646416 -
Attachment is obsolete: true
Attachment #646416 -
Flags: review?(bhackett1024)
Reporter | ||
Comment 18•12 years ago
|
||
This is mainly what changed in order to get the browser building. I still have not run this through try; will do that next.
Attachment #646683 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #646417 -
Attachment is obsolete: true
Attachment #646417 -
Flags: review?(bhackett1024)
Reporter | ||
Comment 19•12 years ago
|
||
just in case it's helpful to some poor sucker needing to rebase this stuff (hi terrence!), this is the script I use to generate the automated portion. Run it with no arguments from within js/src.
Reporter | ||
Updated•12 years ago
|
Attachment #646679 -
Attachment description: Use JSHandleObject in the JSAPI (all but jsapi-tests) → patch 2 - Use JSHandleObject in the JSAPI (all but jsapi-tests)
Reporter | ||
Updated•12 years ago
|
Attachment #646681 -
Attachment description: Use JSHandleObject in jsapi-tests (it works out differently than the rest of SM) → patch 3 - Use JSHandleObject in jsapi-tests (it works out differently than the rest of SM)
Reporter | ||
Updated•12 years ago
|
Attachment #646683 -
Attachment description: Manual portion of step 3 (un-handlifying the JSAPI) → patch 5 - Manual portion of step 3 (un-handlifying the JSAPI)
Assignee | ||
Comment 20•12 years ago
|
||
Comment on attachment 646376 [details] [diff] [review] patch1 - Make RawObject typedef for documenting parameters that do not require rooting Review of attachment 646376 [details] [diff] [review]: ----------------------------------------------------------------- I've already done half of this, so I'm going to steal the r+. ::: js/src/gc/Root.h @@ +224,5 @@ > /* > + * Raw pointer used as documentation that a parameter does not need to be > + * rooted. > + */ > +typedef JSObject * RawObject; I've already got this and equivalent comment checked into central, farther down in the file.
Attachment #646376 -
Flags: review?(bhackett1024) → review+
Reporter | ||
Comment 21•12 years ago
|
||
Sorry for the patch churn, but try server found one stupid thing I messed up in CTypes.cpp. This incorporates it. This is also rebased onto the latest greatest m-i.
Attachment #646765 -
Flags: review?(bhackett1024)
Reporter | ||
Updated•12 years ago
|
Attachment #646679 -
Attachment is obsolete: true
Attachment #646679 -
Flags: review?(bhackett1024)
Updated•12 years ago
|
Attachment #646681 -
Flags: review?(bhackett1024) → review+
Updated•12 years ago
|
Attachment #646765 -
Flags: review?(bhackett1024) → review+
Comment 22•12 years ago
|
||
Comment on attachment 646682 [details] [diff] [review] patch 4 - Automated portion of step 3 (un-handlifying JSAPI) Review of attachment 646682 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jstypedarray.cpp @@ +3302,2 @@ > { > + RootedObject obj_(cx, obj_Arg); Pre-existing it seems, but the script kind of made a hash of these obj_ args, which should be renamed I think.
Attachment #646682 -
Flags: review?(bhackett1024) → review+
Updated•12 years ago
|
Attachment #646683 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 23•12 years ago
|
||
And we have a green try run: https://tbpl.mozilla.org/?tree=Try&rev=950a3d974aa6 And we are pushed: https://hg.mozilla.org/integration/mozilla-inbound/rev/a91040f69ea3
Assignee | ||
Updated•12 years ago
|
Assignee: general → terrence
Blocks: ExactRooting
Comment 24•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a91040f69ea3
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in
before you can comment on or make changes to this bug.
Description
•