Closed
Bug 887241
Opened 12 years ago
Closed 12 years ago
Figure out how to deal with mainthread-only atoms in worker events
Categories
(Core :: DOM: Workers, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(1 file)
|
42.68 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
Should we have per-thread atom tables? And perhaps store the thread info in atom, and
if for some reason comparing atom from another thread, do slow string
comparison.
| Assignee | ||
Comment 1•12 years ago
|
||
Assignee: nobody → bugs
| Assignee | ||
Comment 2•12 years ago
|
||
| Assignee | ||
Comment 3•12 years ago
|
||
Comment on attachment 789185 [details] [diff] [review]
v3
Let non-main-thread to deal with strings, not atoms.
This is not super pretty, but we agreed to use strings in workers, for now.
Attachment #789185 -
Flags: review?(khuey)
| Assignee | ||
Comment 4•12 years ago
|
||
Note, I assume the setup may need some tweaking while landing more stuff to support
DOM events in workers.
| Assignee | ||
Updated•12 years ago
|
Comment on attachment 789185 [details] [diff] [review]
v3
Review of attachment 789185 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/events/src/EventTarget.cpp
@@ +40,5 @@
> + }
> + return SetEventHandler(nullptr,
> + Substring(aType, 2), // Remove "on"
> + aHandler, rv);
> +}
Yuck. Have you done perf testing of code that goes through this method?
::: content/events/src/nsDOMEvent.cpp
@@ +57,5 @@
> nsPresContext* aPresContext, nsEvent* aEvent)
> {
> SetIsDOMBinding();
> SetOwner(aOwner);
> + mIsMainThreadEvent = mOwner || NS_IsMainThread();
Is this going to be true for long? Why wouldn't worker thread events have owners?
Attachment #789185 -
Flags: review?(khuey) → review+
| Assignee | ||
Comment 6•12 years ago
|
||
That mOwner is nsPIDOMWindow, so certainly we won't have that in the workers.
Also, the owner is there just for parent object. In workers we should be able to return null
as parent.
| Assignee | ||
Comment 7•12 years ago
|
||
And that SetEventHandler is for chrome only JS event targets to implement onfoos.
| Assignee | ||
Comment 8•12 years ago
|
||
Comment 9•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•