Closed
Bug 1015430
Opened 10 years ago
Closed 10 years ago
Fix more XPCOM constructors to clarify whether they should be explicit
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
20.74 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8428003 -
Flags: review?(nfroyd)
Comment 2•10 years ago
|
||
Comment on attachment 8428003 [details] [diff] [review] Fix more XPCOM constructors to clarify whether they should be explicit Review of attachment 8428003 [details] [diff] [review]: ----------------------------------------------------------------- ::: ipc/glue/BackgroundImpl.cpp @@ +926,5 @@ > > MOZ_ALWAYS_TRUE(NS_SUCCEEDED(NS_DispatchToMainThread(runnable))); > } > > + return already_AddRefed<ContentParent>(actor->mContent.get()); This seems really dodgy, but I guess it's what the code already does, so... ::: xpcom/string/public/nsTString.h @@ +58,1 @@ > nsTString_CharT( const substring_tuple_type& tuple ) Does MOZ_IMPLICIT nsTString_CharT(...) overflow a line or something? Can you put the MOZ_IMPLICIT on the same line if not? @@ +529,1 @@ > nsTAutoString_CharT( const substring_tuple_type& tuple ) Here too.
Attachment #8428003 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Nathan Froyd (:froydnj) from comment #2) > Comment on attachment 8428003 [details] [diff] [review] > Fix more XPCOM constructors to clarify whether they should be explicit > > Review of attachment 8428003 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: ipc/glue/BackgroundImpl.cpp > @@ +926,5 @@ > > > > MOZ_ALWAYS_TRUE(NS_SUCCEEDED(NS_DispatchToMainThread(runnable))); > > } > > > > + return already_AddRefed<ContentParent>(actor->mContent.get()); > > This seems really dodgy, but I guess it's what the code already does, so... See bug 1015182. Surprisingly, this is intentional! > ::: xpcom/string/public/nsTString.h > @@ +58,1 @@ > > nsTString_CharT( const substring_tuple_type& tuple ) > > Does MOZ_IMPLICIT nsTString_CharT(...) overflow a line or something? Can > you put the MOZ_IMPLICIT on the same line if not? Sure.
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/28d085d43fa6
Comment 5•10 years ago
|
||
(In reply to Nathan Froyd from comment #2) > > + return already_AddRefed<ContentParent>(actor->mContent.get()); > > This seems really dodgy It is indeed dodgy, it should say dont_AddRef(actor->mContent.get());
Comment 6•10 years ago
|
||
(partly for the free type deduction and partly for the self-documenting function name)
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/28d085d43fa6
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•