Closed
Bug 930625
Opened 12 years ago
Closed 12 years ago
Fix several new exact rooting hazards in spidermonkey
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: terrence, Assigned: terrence)
References
Details
Attachments
(1 file)
9.89 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
A bunch of new hazards popped up throughout SpiderMonkey in the last couple of weeks. They were pretty much all just missing handles with a couple of missing roots for good measure.
Attachment #821786 -
Flags: review?(sphink)
Comment 1•12 years ago
|
||
Comment on attachment 821786 [details] [diff] [review]
hazard_misc_sm-v0.diff
Review of attachment 821786 [details] [diff] [review]:
-----------------------------------------------------------------
Nice sweep through these, thanks!
::: js/src/jsapi-tests/testNullRoot.cpp
@@ +9,5 @@
>
> BEGIN_TEST(testNullRoot)
> {
> + JS::RootedObject obj(cx);
> + CHECK(JS_AddObjectRoot(cx, obj.address()));
This is a little weird. The test makes more sense with a bare pointer.
Then again, I'd rather it be weird than have extra false positive hazards cluttering things up. The right thing would probably be some sort of analysis-visible annotation, but I don't care enough.
Attachment #821786 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 2•12 years ago
|
||
(In reply to Steve Fink [:sfink] from comment #1)
> This is a little weird. The test makes more sense with a bare pointer.
Yup :-). That said, the test is for AddRoot on a nullptr, so it's still testing the right thing. And it's now testing Rooted of a nullptr too, so I guess the test is even better now?
> Then again, I'd rather it be weird than have extra false positive hazards
> cluttering things up. The right thing would probably be some sort of
> analysis-visible annotation, but I don't care enough.
Agreed.
https://hg.mozilla.org/integration/mozilla-inbound/rev/be2e01347abd
Comment 3•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•