Closed Bug 1177406 Opened 9 years ago Closed 9 years ago

Why is mIsMainThreadEvent set if an event has an owner?

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: khuey, Assigned: smaug)

Details

Attachments

(1 file)

Seems kind of bogus ...

It also means that if you call BindToOwner on a DETH and then use DispatchTrustedEvent it will assert, because that event ends up with mIsMainThreadEvent set to true.
Flags: needinfo?(bugs)
Because we certainly didn't use to have owner on workers.
And BindToOwner in DETH was about nsPIDOMWindow.

You're talking about BindToOwner+DispatchTrustedEvent on a worker?
Flags: needinfo?(bugs)
Yep.  nsm is doing that in notifications (well, he's skipping BindToOwner now ...)
Assignee: nobody → bugs
Attached patch patchSplinter Review
The idea was originally to skip extra NS_IsMainThread call when possible, 
but I guess we just should do this.
Attachment #8626169 - Flags: review?(khuey)
Comment on attachment 8626169 [details] [diff] [review]
patch

Review of attachment 8626169 [details] [diff] [review]:
-----------------------------------------------------------------

NS_IsMainThread should be fast inside libxul.
Attachment #8626169 - Flags: review?(khuey) → review+
https://hg.mozilla.org/mozilla-central/rev/1c071a0d3421
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: