Closed
Bug 903270
Opened 11 years ago
Closed 11 years ago
set thread name for initial event of NS_NewNamedThread()
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: karlt, Assigned: karlt)
References
Details
Attachments
(3 files)
1.05 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
1011 bytes,
patch
|
chiajung
:
review+
|
Details | Diff | Splinter Review |
1.09 KB,
patch
|
cajbir
:
review+
|
Details | Diff | Splinter Review |
Some clients are using NS_NewNamedThread() to start a thread, with a single event.
Assignee | ||
Comment 1•11 years ago
|
||
Comment 2•11 years ago
|
||
Comment on attachment 787952 [details] [diff] [review]
patch
I'm not an XPCOM peer, and jlebar is out for a few days, so bouncing this to bsmedberg.
Attachment #787952 -
Flags: review?(continuation) → review?(benjamin)
Assignee | ||
Updated•11 years ago
|
Attachment #787952 -
Flags: review?(benjamin) → review?(doug.turner)
Comment 3•11 years ago
|
||
Comment on attachment 787952 [details] [diff] [review]
patch
Review of attachment 787952 [details] [diff] [review]:
-----------------------------------------------------------------
Could you drop the last argument from the following places:
http://mxr.mozilla.org/mozilla-central/source/content/media/MediaDecoderStateMachine.cpp#253
http://mxr.mozilla.org/mozilla-central/source/content/media/MediaDecoderStateMachine.cpp#1755
http://mxr.mozilla.org/mozilla-central/source/content/media/webrtc/MediaEngineWebRTC.h#114
::: xpcom/glue/nsThreadUtils.h
@@ +73,5 @@
> + nsresult rv = NS_NewThread(result, nullptr, stackSize);
> + NS_ENSURE_SUCCESS(rv, rv);
> + NS_SetThreadName<LEN>(*result, name);
> + if (initialEvent)
> + rv = (*result)->Dispatch(initialEvent, NS_DISPATCH_NORMAL);
Did we use to just drop the initial event?
http://mxr.mozilla.org/mozilla-central/source/content/media/MediaStreamGraph.cpp#1427
@@ +75,5 @@
> + NS_SetThreadName<LEN>(*result, name);
> + if (initialEvent)
> + rv = (*result)->Dispatch(initialEvent, NS_DISPATCH_NORMAL);
> +
> + return rv;
NS_WARN (or whatever) before the return?
Attachment #787952 -
Flags: review?(doug.turner) → review+
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #3)
> Did we use to just drop the initial event?
It was passed to NS_NewThread() before.
> @@ +75,5 @@
> > + NS_SetThreadName<LEN>(*result, name);
> > + if (initialEvent)
> > + rv = (*result)->Dispatch(initialEvent, NS_DISPATCH_NORMAL);
> > +
> > + return rv;
>
> NS_WARN (or whatever) before the return?
- if (initialEvent)
+ if (initialEvent) {
rv = (*result)->Dispatch(initialEvent, NS_DISPATCH_NORMAL);
+ NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Initial event dispatch failed");
+ }
Comment 5•11 years ago
|
||
+1
Assignee | ||
Comment 6•11 years ago
|
||
Requested in comment 3.
Attachment #795267 -
Flags: review?(chung)
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #3)
> Could you drop the last argument from the following places:
http://hg.mozilla.org/mozilla-central/annotate/60c382ba1773/content/media/MediaDecoderStateMachine.cpp#l1755 has a non-default stack-size.
Looks like http://hg.mozilla.org/mozilla-central/annotate/60c382ba1773/content/media/MediaDecoderStateMachine.cpp#l253 had a non-default stack-size before
http://hg.mozilla.org/mozilla-central/rev/8eb1a29b4aa0
Bug 691096 comment 25 indicates that was intentional.
Assignee | ||
Comment 8•11 years ago
|
||
Requested in comment 3.
Attachment #795269 -
Flags: review?(chris.double)
Assignee | ||
Updated•11 years ago
|
Attachment #795267 -
Attachment description: camera.null.event → remove default null initial event parameter from NS_NewNamedThread() call site
Updated•11 years ago
|
Attachment #795269 -
Flags: review?(chris.double) → review+
Assignee | ||
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/25742c3becd6
https://hg.mozilla.org/mozilla-central/rev/5b5af3c9e1b1
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•11 years ago
|
Attachment #795267 -
Flags: review?(chung) → review+
Assignee | ||
Comment 11•11 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•