Closed
Bug 1450167
Opened 6 years ago
Closed 6 years ago
Consider switching back to just using atoms for event types
Categories
(Core :: DOM: Events, enhancement, P3)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
60.72 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Right now we use atoms on mainthread and strings off-mainthread. That requires us to have two variants of EventListenerAdded and EventListenerRemoved and adds a bunch of complexity in the ELM for the two cases. It seems to me that we could just use atoms consistently, now that we have threadsafe atoms. On background threads we wouldn't be able to use the nsContentUtils name-to-atom caches, but that should be ok, right? Olli, thoughts?
Flags: needinfo?(bugs)
Comment 1•6 years ago
|
||
Sounds good. I thought I had filed a bug to make worker code to use atoms, but perhaps not.
Flags: needinfo?(bugs)
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Comment 2•6 years ago
|
||
Now that we support atoms off the the main thread, we can just use atoms.
Attachment #8994382 -
Flags: review?(bugs)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 3•6 years ago
|
||
Comment on attachment 8994382 [details] [diff] [review] Stop using atom-or-string for event names in the listener manager > EventListenerManager::AddEventListenerInternal( > EventListenerHolder aListenerHolder, > EventMessage aEventMessage, > nsAtom* aTypeAtom, >- const nsAString& aTypeString, > const EventListenerFlags& aFlags, > bool aHandler, > bool aAllEvents) > { >- MOZ_ASSERT(// Main thread >- (NS_IsMainThread() && aEventMessage && aTypeAtom) || >- // non-main-thread >- (!NS_IsMainThread() && aEventMessage) || >- aAllEvents, "Missing type"); // all-events listener >+ MOZ_ASSERT(aEventMessage || >+ aAllEvents, // all-events listener (aEventMessage && aTypeAtom) right?
Attachment #8994382 -
Flags: review?(bugs) → review+
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/608abb3e16ab Stop using atom-or-string for event names in the listener manager. r=smaug
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/608abb3e16ab
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•