Closed
Bug 315901
Opened 19 years ago
Closed 19 years ago
Move RangeList and EventListenerManager hashes to nsContentUtils
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: peterv, Assigned: peterv)
Details
Attachments
(2 files)
41.44 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
44.33 KB,
patch
|
Details | Diff | Splinter Review |
and consolidate the code.
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #210348 -
Flags: superreview?(jst)
Attachment #210348 -
Flags: review?(jst)
Comment 2•19 years ago
|
||
Comment on attachment 210348 [details] [diff] [review] v1 - In content/base/src/nsGenericElement.h (and a few other places): PRBool HasEventListenerManager() const { PtrBits flags = GetFlags(); - return (flags & GENERIC_ELEMENT_HAS_LISTENERMANAGER && - sEventListenerManagersHash.ops); + return (flags & GENERIC_ELEMENT_HAS_LISTENERMANAGER); Did you verify that it's safe to take out this ops check? I.e. there's no code that calls HasEventListenerManager() and then assumes that GetListenerManager() etc will come back with a non-null pointer? r+sr=jst with that double checked, if you didn't already.
Attachment #210348 -
Flags: superreview?(jst)
Attachment #210348 -
Flags: superreview+
Attachment #210348 -
Flags: review?(jst)
Attachment #210348 -
Flags: review+
Assignee | ||
Comment 3•19 years ago
|
||
(In reply to comment #2) > Did you verify that it's safe to take out this ops check? I.e. there's no code > that calls HasEventListenerManager() and then assumes that GetListenerManager() > etc will come back with a non-null pointer? I did, but I just realized that the NS_ERRORs will fire in nsGenericElement::~nsGenericElement and nsGenericElement::HandleDOMEvent if nsContentUtils::Shutdown has been called already (HasEventListenerManager will be PR_TRUE but LookupListenerManager will return nsnull). I could add a IsInitialized function to nsContentUtils and either add a call to that in HasEventListenerManager or directly in those two functions (inside the ifdef DEBUG blocks). Or we could drop the NS_ERRORs, but that seems like a bad idea to me. Let me know what you prefer.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.9alpha
Comment 4•19 years ago
|
||
Seems like calling the IsInitialized() method inside those two #ifdef DEBUG blocks would be the way to go IMO.
Assignee | ||
Comment 5•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 6•19 years ago
|
||
It looks like this regressed Tdhtml some... any idea why?
Comment 7•19 years ago
|
||
In particular, the movingtext and replaceimages tests got a good bit slower (order of 5% or so).
Assignee | ||
Comment 8•19 years ago
|
||
(In reply to comment #6) > It looks like this regressed Tdhtml some... any idea why? Hmm, no. The code should be mostly equivalent, unless I've messed something up.
Comment 9•19 years ago
|
||
Do you see a timing difference on those two tests before and after this patch?
Comment 10•19 years ago
|
||
By the way, why do we need the casts to nsIXMLContent* in nsGenericElement? It has unique inheritance from nsIContent, no?
Comment 11•19 years ago
|
||
So I don't see anything in this patch that would regress Tdhtml... :( I really wish I had an idea why that time jumped.
Comment 12•19 years ago
|
||
Yeah, I tried building without this patch and there was no effect on the movingtext test. :( I really wish I knew what happened to the tinderbox...
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•