The default bug view has changed. See this FAQ.

Add assertion checking to ensure no unintentional cross-compartment wrappers are created

RESOLVED FIXED in mozilla8

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: billm, Assigned: billm)

Tracking

(Blocks: 1 bug)

unspecified
mozilla8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Created attachment 545480 [details] [diff] [review]
assertions

Bug 670702 has evidence that some non-cross compartment JSWrappers have pointers outside their compartment. Blake confirms that this is not expected. This patch adds some additional opt-mode assertions to try and narrow down the code creating these pointers.

I'm sorry about how gross the check is. Unfortunately, we're not allowed to get the compartment for static strings, since they're not part of the GC heap.
Attachment #545480 - Flags: review?(mrbkap)
(Assignee)

Comment 1

6 years ago
Created attachment 545485 [details] [diff] [review]
nicer patch

Since the priv field can't be a string, this patch is shorter.
Assignee: general → wmccloskey
Attachment #545480 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #545485 - Flags: review?(mrbkap)
Attachment #545480 - Flags: review?(mrbkap)

Updated

6 years ago
Attachment #545485 - Flags: review?(mrbkap) → review+
(Assignee)

Updated

6 years ago
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/4fc08ab607db
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.