Closed
Bug 988787
Opened 11 years ago
Closed 11 years ago
Should fire "handle-system-messages-done" at a correct time point
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: airpingu, Assigned: airpingu)
References
Details
Attachments
(1 file)
4.23 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
I noticed this bug when I'm trying to solve bug 874353. To be honest, I don't have a good solution to strip out "handle-system-messages-done" for now but I'm sure the way of firing it is wrong.
The reason is, imaging if we have two consecutive messages that need to be dispatched. When the first one is handled, the second one will be queued and returned by _dispatchMessage(). This will make the original notification fail:
if (!dispatcher || !dispatcher.isHandling) {
Services.obs.notifyObservers(/* aSubject */ null,
"handle-system-messages-done",
/* aData */ null);
}
because |dispatcher.isHandling| is true. We should move it to a better time point to fire. Otherwise, the ContentChild/ContentParent will rely on the 30-second timeout to release the CPU wake lock, which is power consuming.
"handle-system-messages-done" has to be fired when the last message has been handled for sure.
Attachment #8397735 -
Flags: review?(fabrice)
Assignee | ||
Comment 2•11 years ago
|
||
Updated•11 years ago
|
Attachment #8397735 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Try looks good: https://tbpl.mozilla.org/?tree=Try&rev=e29c531e24e2
Depends on: 988129
Assignee | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•