Closed Bug 730601 Opened 8 years ago Closed 8 years ago

Don't use GetListenerManager(false) to check existence of ELM, but HasListenerManager

Categories

(Core :: DOM: Core & HTML, defect)

12 Branch
x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
No description provided.
Attachment #600698 - Flags: review?(jst)
Attachment #600698 - Flags: review?(jst) → review+
We should consider adding a |bool HasListenerManager() const| on nodes.
Ooops, I realized why I had used GetListenerManager(). it works with document nodes.
Can we set the bit for documents as neeeded?
Yes.
Attached patch v2Splinter Review
Actually the previous patch would have worked just fine, since that
code was dealing with nsIContents. 
But since I started to look at this ...
https://tbpl.mozilla.org/?tree=Try&rev=5b2add087030
Attachment #600698 - Attachment is obsolete: true
Summary: Don't use GetListenerManager(false) to check existence of ELM, but HasFlag(NODE_HAS_LISTENERMANAGER) → Don't use GetListenerManager(false) to check existence of ELM, but HasListenerManager
Comment on attachment 600782 [details] [diff] [review]
v2

Need to have separate handling for non-document objects and document
objects, but HasListenerManager() itself is better API.
Attachment #600782 - Flags: review?(jst)
Attachment #600782 - Flags: review?(jst) → review+
https://hg.mozilla.org/mozilla-central/rev/53e10e2b327b
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.