Closed
Bug 968558
Opened 11 years ago
Closed 10 years ago
The IdleService can entrain ContentParents
Categories
(Core :: DOM: Content Processes, defect)
Core
DOM: Content Processes
Tracking
()
RESOLVED
DUPLICATE
of bug 1166592
Tracking | Status | |
---|---|---|
b2g-v1.2 | --- | unaffected |
b2g-v1.3 | --- | affected |
People
(Reporter: khuey, Assigned: reuben)
References
Details
(Whiteboard: [systemsfe])
Attachments
(1 obsolete file)
We can't rely on the content process to remove all of its idle observers, it may crash.
Please test this reuben.
Attachment #8371148 -
Flags: review?(fabrice)
Attachment #8371148 -
Flags: feedback?(reuben.bmo)
Assignee | ||
Comment 1•11 years ago
|
||
Comment on attachment 8371148 [details] [diff] [review]
Patch
Review of attachment 8371148 [details] [diff] [review]:
-----------------------------------------------------------------
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #0)
> Please test this reuben.
This patch doesn't break things that use the IdleListener on b2g-desktop, but I'm seeing some weird behavior that is probably b2g-desktop specific. I'll get this on a device and see if things work and if I can reproduce the leaks.
::: dom/ipc/ContentParent.cpp
@@ +3256,1 @@
> mIdleListeners.Put(aObserver, listener);
Looks like you forgot to change mIdleListeners' type?
@@ +3270,1 @@
> bool found = mIdleListeners.Get(aObserver, &listener);
Ditto.
@@ +3270,3 @@
> bool found = mIdleListeners.Get(aObserver, &listener);
> if (found) {
> + if (aObserver->Time() != aIdleTimeInS) {
Presumably you meant listener->Time() here?
@@ +3277,2 @@
> mIdleListeners.Remove(aObserver);
> + listener->RemoveSelf(idleService);
This is not supposed to change any semantics, right? You just factored the code into RemoveSelf because it's now used in two different places?
::: dom/ipc/ContentParent.h
@@ +601,5 @@
> } // namespace dom
> } // namespace mozilla
>
> class ParentIdleListener : public nsIObserver {
> + friend class mozilla::dom::ContentParent;
Is this actually needed? It doesn't look like you're using it anywhere.
@@ +615,4 @@
> {}
> virtual ~ParentIdleListener() {}
> +
> + void RemoveSelf(nsIIdleService* aIdleService);
This file needs to include nsIIdleService.h.
Reporter | ||
Updated•11 years ago
|
Assignee: khuey → reuben.bmo
Updated•11 years ago
|
Whiteboard: [systemsfe]
Assignee | ||
Updated•11 years ago
|
Attachment #8371148 -
Flags: feedback?(reuben.bmo)
Comment 3•11 years ago
|
||
Comment on attachment 8371148 [details] [diff] [review]
Patch
Review of attachment 8371148 [details] [diff] [review]:
-----------------------------------------------------------------
Is that still something we want to fix?
Attachment #8371148 -
Flags: review?(fabrice)
Reporter | ||
Comment 4•11 years ago
|
||
Yes.
Updated•11 years ago
|
Attachment #8371148 -
Flags: review?(fabrice)
Reporter | ||
Comment 5•11 years ago
|
||
Comment on attachment 8371148 [details] [diff] [review]
Patch
To be clear, this patch doesn't work. But we want to fix this bug.
Attachment #8371148 -
Attachment is obsolete: true
Attachment #8371148 -
Flags: review?(fabrice)
Updated•10 years ago
|
Component: IPC → DOM: Content Processes
Comment 6•10 years ago
|
||
I read MDN, but still not sure should I set this a duplicate of bug 1166592 or resolved as worksforme...
Assignee | ||
Comment 7•10 years ago
|
||
Looks like a DUPLICATE. Thanks for fixing it!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•