Closed
Bug 959886
Opened 11 years ago
Closed 11 years ago
Handle offline cache updates in parent process after windows are being torn down in child processes
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
People
(Reporter: bent.mozilla, Assigned: bent.mozilla)
References
Details
Attachments
(1 file)
(deleted),
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
We're currently sending offline cache update notifications to child processes even after we've started the PBrowser teardown sequence, leading to MsgRouteErrors. Attached patch should fix the issue.
I also removed an unnecessary function (Kill) and a nonexistent function (RefcountHitZero), and added a few more MOZ_OVERRIDE annotations.
Attachment #8360131 -
Flags: review?(honzab.moz)
Comment 1•11 years ago
|
||
Comment on attachment 8360131 [details] [diff] [review]
changes.patch
Review of attachment 8360131 [details] [diff] [review]:
-----------------------------------------------------------------
untested locally. please push to try (and expose the link here) before landing.
r=honzab
::: dom/ipc/TabParent.cpp
@@ +280,5 @@
> + const InfallibleTArray<POfflineCacheUpdateParent*>& ocuParents =
> + ManagedPOfflineCacheUpdateParent();
> + for (uint32_t i = 0; i < ocuParents.Length(); ++i) {
> + static_cast<mozilla::docshell::OfflineCacheUpdateParent*>(ocuParents[i])->
> + StopSendingMessagesToChild();
please, to a local var first (for debugging)
@@ +1578,4 @@
> {
> + // A reference is guaranteed here, no need for a nsRefPtr.
> + auto update =
> + static_cast<mozilla::docshell::OfflineCacheUpdateParent*>(aActor);
I'd still rather see it used here.
::: uriloader/prefetch/OfflineCacheUpdateParent.cpp
@@ -60,5 @@
> - // Make sure the service has been initialized
> - nsOfflineCacheUpdateService* service =
> - nsOfflineCacheUpdateService::EnsureService();
> - if (!service)
> - return;
Please leave this here, it inits the NSPR log.
Attachment #8360131 -
Flags: review?(honzab.moz) → review+
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #1)
> > - // Make sure the service has been initialized
> > - nsOfflineCacheUpdateService* service =
> > - nsOfflineCacheUpdateService::EnsureService();
> > - if (!service)
> > - return;
>
> Please leave this here, it inits the NSPR log.
Hrm, can I remove the null check then? Returning early from a constructor is... weird. Luckily failure is handled in Schedule though.
Comment 3•11 years ago
|
||
(In reply to ben turner [:bent] (use the needinfo? flag!) from comment #2)
> Hrm, can I remove the null check then? Returning early from a constructor
> is... weird. Luckily failure is handled in Schedule though.
Definitely, go ahead.
Assignee | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Comment on attachment 8360131 [details] [diff] [review]
changes.patch
Review of attachment 8360131 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/ipc/TabParent.cpp
@@ +1578,3 @@
> {
> + // A reference is guaranteed here, no need for a nsRefPtr.
> + auto update =
btw, are you sure auto is supported by all compilers we claim to build on?
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #5)
> btw, are you sure auto is supported by all compilers we claim to build on?
Yep!
Assignee | ||
Comment 7•11 years ago
|
||
Bah, that's what I get for being hasty.
https://tbpl.mozilla.org/?tree=Try&rev=dac55c9fc67e
Assignee | ||
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Comment 11•11 years ago
|
||
status-b2g-v1.3:
--- → fixed
status-b2g-v1.4:
--- → fixed
status-firefox27:
--- → wontfix
status-firefox28:
--- → fixed
status-firefox29:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•