Closed
Bug 1167468
Opened 9 years ago
Closed 9 years ago
Assert that JSCompartment::objectMetadataTable never holds wrappers
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: jimb, Assigned: jimb)
Details
Attachments
(1 file, 1 obsolete file)
No description provided.
Attachment #8609111 -
Flags: review?(nfitzgerald)
Assignee | ||
Comment 1•9 years ago
|
||
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=16e8fd6456f6
Comment 2•9 years ago
|
||
Comment on attachment 8609111 [details] [diff] [review] Assert that JSObjects and their metadata are always in the same compartment. Review of attachment 8609111 [details] [diff] [review]: ----------------------------------------------------------------- Awesome, thanks! ::: js/src/jscompartment.cpp @@ +724,3 @@ > > if (JSObject* metadata = objectMetadataCallback(cx, obj)) { > + MOZ_ASSERT(this == metadata->compartment()); Is there a reason why we aren't using assertSameCompartment for these checks (and the existing one)? When should I prefer one over the other?
Attachment #8609111 -
Flags: review?(nfitzgerald) → review+
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jimb
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen][:nf] from comment #2) > Is there a reason why we aren't using assertSameCompartment for these checks > (and the existing one)? When should I prefer one over the other? I was just blindly imitating what I saw around me; assertSameCompartment is almost certainly better. I've changed the patch.
Assignee | ||
Comment 4•9 years ago
|
||
That last try push was a total mess for extraneous reasons, so here's another attempt: https://treeherder.mozilla.org/#/jobs?repo=try&revision=46dc3f9580a0 I've also added an assertion that DebuggerObject_getAllocationSite never retrieves a wrapper; I think we'd agreed to do that on IRC originally.
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Flags: in-testsuite-
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•