Closed
Bug 897945
Opened 12 years ago
Closed 12 years ago
Use an XPCOM string for nsContentUtils::ReportToConsole's category argument
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
Details
Attachments
(1 file)
11.72 KB,
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #780933 -
Flags: review?(bobbyholley+bmo)
Comment 1•12 years ago
|
||
Comment on attachment 780933 [details] [diff] [review]
Patch v1
Review of attachment 780933 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/base/public/nsContentUtils.h
@@ +804,5 @@
> const nsAFlatString& aSourceLine
> = EmptyString(),
> uint32_t aLineNumber = 0,
> uint32_t aColumnNumber = 0);
> + template<uint32_t N>
I don't understand. Why does this need to be templatized?
Attachment #780933 -
Flags: review?(bobbyholley+bmo)
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 780933 [details] [diff] [review]
Patch v1
Review of attachment 780933 [details] [diff] [review]:
-----------------------------------------------------------------
The templates allow passing a literal string, which is fine, and I didn't really want to add NS_LITERAL_CSTRING to every call.
Attachment #780933 -
Flags: review?(bobbyholley+bmo)
Comment 3•12 years ago
|
||
Why can't that overload take a const char* instead?
Assignee | ||
Comment 4•12 years ago
|
||
This bug was prompted by someone passing the result of ToNewUTF8String there, so that's exactly what I want to avoid here.
Comment 5•12 years ago
|
||
Comment on attachment 780933 [details] [diff] [review]
Patch v1
Review of attachment 780933 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/base/public/nsContentUtils.h
@@ +805,5 @@
> = EmptyString(),
> uint32_t aLineNumber = 0,
> uint32_t aColumnNumber = 0);
> + template<uint32_t N>
> + static nsresult ReportToConsole(uint32_t aErrorFlags,
Please add a comment explaining the trick and why we need the overload.
Attachment #780933 -
Flags: review?(bobbyholley+bmo) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•