Closed Bug 1406328 Opened 3 years ago Closed 3 years ago
Don't shut down Media
Cache::m Thread too early
59 bytes, text/x-review-board-request
https://reviewboard-hg.mozilla.org/gecko/rev/228b08c8c93437a938ca3e3b6f24bf597690e65d#l2.52 It is possible for an nsIChannel to live longer than a MediaCache. Shutting down the thread too early will cause Dispatch() to fail  and result in leaks .  http://searchfox.org/mozilla-central/rev/8efd128b48cdae3a6c6862795ce618aa1ca1c0b4/netwerk/ipc/ChannelEventQueue.cpp#178  http://searchfox.org/mozilla-central/rev/8efd128b48cdae3a6c6862795ce618aa1ca1c0b4/xpcom/threads/ThreadEventTarget.cpp#128
Assignee: nobody → jwwang
Priority: -- → P3
Attachment #8916467 - Flags: review?(gsquelart)
Comment on attachment 8916467 [details] Bug 1406328 - shut down the MediaCache thread in ShutdownThreads phase. https://reviewboard.mozilla.org/r/187586/#review192594 Clever way to (ab)use ClearOnShutdown! :-) ::: commit-message-50846:1 (Diff revision 1) > +Bug 1406328 - shut down the MediaCache thread in ShutdownThreads phase. > + > +To avoid leaks caused by Dispatch() failures. See comment 0 for the detail. I think you should also mention that this patch introduces a new (and I think, better) behavior: Only one thread is ever created, and is shared between all MediaCaches.
Attachment #8916467 - Flags: review?(gsquelart) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/3ceb919e7e82 shut down the MediaCache thread in ShutdownThreads phase. r=gerald
Backed out for build bustage at dom/media/MediaCache.cpp:301: 'ShutdownPhase' has not been declared: https://hg.mozilla.org/integration/autoland/rev/224b59f8a361ddbd51489dc3b74b9d53e66f1df2 Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=3ceb919e7e829c358e18ca234c1a100871e29963&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=135626892&repo=autoland /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:301:29: error: 'ShutdownPhase' has not been declared /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:301:59: error: 'ClearOnShutdown' was not declared in this scope
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/2e858715590b shut down the MediaCache thread in ShutdownThreads phase. r=gerald
You need to log in before you can comment on or make changes to this bug.