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)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: Waldo, Assigned: Waldo)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter 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 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 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
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: