Prevent cross-thread XPConnect access to nsIClassInfo::MAIN_THREAD_ONLY-flagged objects

RESOLVED FIXED in mozilla2.0b8

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: brendan, Assigned: brendan)

Tracking

unspecified
mozilla2.0b8
Points:
---

Firefox Tracking Flags

(blocking2.0 beta8+)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Summary says it all.

/be
(Assignee)

Comment 1

9 years ago
Seems to work, browsing with it.

/be
Attachment #491748 - Flags: review?(gal)

Updated

9 years ago
Attachment #491748 - Flags: review?(gal) → review+
(Assignee)

Comment 2

9 years ago
http://hg.mozilla.org/tracemonkey/rev/9bb386e639e5

/be
Status: NEW → ASSIGNED
Whiteboard: fixed-in-tracemonkey

Comment 3

9 years ago
http://hg.mozilla.org/mozilla-central/rev/9bb386e639e5
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
I don't think that's a full fix, don't we need a similar check in ConstructSlimWrapper? Also, can we just remove XPC_CHECK_WRAPPER_THREADSAFETY if it'll always be defined anyway?
(Assignee)

Comment 5

9 years ago
(In reply to comment #4)
> I don't think that's a full fix, don't we need a similar check in
> ConstructSlimWrapper?

Peter, can you file this one? Even better if you or a slimwrapper guru can fix. I'm overcommitted elsewhere.

> Also, can we just remove XPC_CHECK_WRAPPER_THREADSAFETY if it'll always be defined anyway?

Minimal change at this stage.

/be

Updated

9 years ago
blocking2.0: --- → beta8+
So if I understand correctly, this prevents creating new wrappers for main-thread-only objects on a non-main thread, right?  If a wrapper for such an object is in the scope of a runnable closure passed to the background thread then this patch doesn't help, as far as I can tell.

It also doesn't help if the problem is the creation and/or refcounting of the C++ object, right?  Because all that happens long before we try to create a wrapper for it...
You need to log in before you can comment on or make changes to this bug.