Closed
Bug 761452
Opened 13 years ago
Closed 13 years ago
Allow constructing/initializing a nsDependentJSString from a JSFlatString
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
Attachments
(1 file)
|
1.11 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
nsDependentJSString can be infallibly initialized from a jsid, or fallibly initialized from a JSString* or jsval. But there's a separate kind of string, JSFlatString*, which could also be used to infallibly initialize an nsDependentJSString. We should have a constructor and infallible init method that take such a value. (I plan to use this in a patch for bug 758912.)
Attachment #630002 -
Flags: review?(bzbarsky)
Comment 1•13 years ago
|
||
Comment on attachment 630002 [details] [diff] [review]
Patch
Is the JS_FORGET_STRING_FLATNESS ugliness really needed? :(
r=me, I guess.
Attachment #630002 -
Flags: review?(bzbarsky) → review+
Comment 2•13 years ago
|
||
Comment on attachment 630002 [details] [diff] [review]
Patch
Review of attachment 630002 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/nsJSUtils.h
@@ +102,5 @@
>
> + void init(JSFlatString* fstr)
> + {
> + new(this) nsDependentJSString(fstr);
> + }
Assert IsEmpty(), please
Comment 3•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
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
•