Closed
Bug 900711
Opened 11 years ago
Closed 11 years ago
~nsIThreadPool can run the event loop if shutdown has not been called
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: karlt, Assigned: bent.mozilla)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa-])
Attachments
(1 file)
2.87 KB,
patch
|
ehsan.akhgari
:
review+
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
nsIThreadPool is scriptable.
Better to leak the thread than run an event loop during GC
Assignee | ||
Comment 1•11 years ago
|
||
I think a better solution would be to just make the destructor delay-shutdown any remaining threads.
Reporter | ||
Comment 2•11 years ago
|
||
Hmm. Perhaps that is possible.
During XPCOM shutdown, there is no thread to delay shutdown, but maybe that's OK because the thread manager will have already shut down the threads.
Assignee | ||
Comment 3•11 years ago
|
||
Something like this perhaps.
Comment 4•11 years ago
|
||
Comment on attachment 785112 [details] [diff] [review]
changes.patch
Review of attachment 785112 [details] [diff] [review]:
-----------------------------------------------------------------
::: xpcom/threads/nsThreadPool.cpp
@@ +41,5 @@
> +{
> +public:
> + NS_DECL_NSIRUNNABLE
> +
> + ShutdownHelper(nsCOMArray<nsIThread>& aThreads,
Nit: const.
Attachment #785112 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #4)
> Nit: const.
We spoke about this on irc, const can't work here due to the SwapElements calls.
https://hg.mozilla.org/integration/mozilla-inbound/rev/7236065ca5bf
Assignee | ||
Comment 6•11 years ago
|
||
Also https://hg.mozilla.org/integration/mozilla-inbound/rev/08b4c4071214 to remove the silly ampersand.
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7236065ca5bf
https://hg.mozilla.org/mozilla-central/rev/08b4c4071214
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Reporter | ||
Comment 8•11 years ago
|
||
Comment on attachment 785112 [details] [diff] [review]
changes.patch
Requesting approval for 914030 comment 4.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): old bug
User impact if declined: will need to make similar existing logic in webaudio more complex.
Testing completed (on m-c, etc.): on m-c for almost 3 weeks
Risk to taking this patch (and alternatives if risky):
What gives me confidence about the low risk of taking this patch is that any scenarios affected by this patch would most likely have been a security risk and so should not exist. If any do still exist, they are better off with this patch.
String or IDL/UUID changes made by this patch: none
Attachment #785112 -
Flags: approval-mozilla-aurora?
Comment 9•11 years ago
|
||
Is bug 914030 being targeted for FF25? Trying to understand the rationale here.
Reporter | ||
Comment 10•11 years ago
|
||
(In reply to Alex Keybl [:akeybl] from comment #9)
> Is bug 914030 being targeted for FF25? Trying to understand the rationale
> here.
Yes, webaudio is targeted for FF25, and bug 914030 is part of that.
Comment 11•11 years ago
|
||
Comment on attachment 785112 [details] [diff] [review]
changes.patch
[Triage Comment]
FF25 is now on Beta, we are targeting Web Audio for 25 so let's get this in early in order to get testing & verification time.
Attachment #785112 -
Flags: approval-mozilla-aurora? → approval-mozilla-beta+
Reporter | ||
Comment 12•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/2335c2fde2a8
https://hg.mozilla.org/releases/mozilla-beta/rev/adb9fbeec38d
status-firefox25:
--- → fixed
Updated•11 years ago
|
status-firefox26:
--- → fixed
Comment 13•11 years ago
|
||
Assuming no verification needed here. Please add the verifyme keyword and remove the [qa-] whiteboard tag to request verification.
Whiteboard: [qa-]
Reporter | ||
Comment 14•11 years ago
|
||
Sorry, this was mostly a non-bug.
Threads keep a reference to the nsThreadPool until they return from Run() after removing themselves from mThreads, so mThreads is always empty in the destructor, and Shutdown() was a no-op.
I think someone put the Shutdown() call in the destructor to confuse us ;)
I'll tidy this up in bug 926522.
You need to log in
before you can comment on or make changes to this bug.
Description
•