Closed
Bug 719949
Opened 12 years ago
Closed 12 years ago
Unmark listeners in XHR, WebSocket and EventSource if the object is black
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(2 files, 1 obsolete file)
10.45 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
9.55 KB,
patch
|
Details | Diff | Splinter Review |
Patch coming soon.
Assignee | ||
Comment 1•12 years ago
|
||
This at least compiles :) The patch relies on changes I've made to EventListenerManager.
Assignee | ||
Comment 2•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=9a3a6d7610ea
Assignee | ||
Comment 3•12 years ago
|
||
I'll ask a review from a DOM peer too. (class nsIXPConnectWrappedJS; should be removed from elm.h)
Attachment #590892 -
Flags: review?(continuation)
Assignee | ||
Comment 4•12 years ago
|
||
Er, the comment about elm.h is about another bug.
Comment 5•12 years ago
|
||
This seems to require the patch in 720536, so I'll review that first.
Updated•12 years ago
|
Attachment #590292 -
Attachment is obsolete: true
Comment 6•12 years ago
|
||
Comment on attachment 590892 [details] [diff] [review] patch Review of attachment 590892 [details] [diff] [review]: ----------------------------------------------------------------- I don't know anything about these classes, but it looks like nsXMLHttpRequest gets mListenerManager and most of its listener event wrappers from nsXHREventTarget, which you didn't add CanSkip stuff to. Is that class never directly instantiated or is there some other reason for not adding it? Are the listener wrappers all null if the listener manager is null? I'm just curious why those unmarks are guarded. As I commented in the other bug, we should think about whether these CanSkipInCCs should be closer to CanSkip in a follow-up patch, as they only unmarkGray stuff, and don't actually touch the purple buffer or whatnot. The xpcprivate.h includes need to be changed back to xpcpublic.h in all 3 places. r=me with the xpcprivate.h includes reverted. ::: content/base/src/nsEventSource.cpp @@ +111,5 @@ > + if (tmp->mListenerManager) { > + tmp->mListenerManager->UnmarkGrayJSListeners(); > + NS_UNMARK_LISTENER_WRAPPER(Open) > + NS_UNMARK_LISTENER_WRAPPER(Message) > + NS_UNMARK_LISTENER_WRAPPER(Error) Maybe have these in the order Open, Error, Message to match their declarations? Though that doesn't match their order in Traverse if IIRC, so whichever you prefer.
Attachment #590892 -
Flags: review?(continuation) → review+
Updated•12 years ago
|
Hardware: x86_64 → All
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #6) > I don't know anything about these classes, but it looks like > nsXMLHttpRequest gets mListenerManager and most of its listener event > wrappers from nsXHREventTarget, nsXHREventTarget is just a helper, so that also upload object can extend it. I'll add upload to bbp later. > Are the listener wrappers all null if the listener manager is null? Yes, unless CC unlink is broken :) > As I commented in the other bug, we should think about whether these > CanSkipInCCs should be closer to CanSkip in a follow-up patch, as they only > unmarkGray stuff, and don't actually touch the purple buffer or whatnot. Well, unmarking can happen only in CanSkip
Assignee | ||
Comment 8•12 years ago
|
||
Comment 9•12 years ago
|
||
Please keep the new timeout event in mind when you check this in (bug 525816).
Comment 10•12 years ago
|
||
It has already been landed on m-c. Hopefully they won't cause too much merge pain. It should be safe to not apply this to all timeouts, but we can fix that in a followup.
Assignee | ||
Comment 11•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/38768b0ef1af
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 12•12 years ago
|
||
Yeah, this is just an optimization. If ontimeout isn't handled in _SKIP_, that doesn't cause any other problems than possibly slightly higher CC times in some cases.
Updated•12 years ago
|
Target Milestone: --- → mozilla12
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
•