Bug 867426 - Remove RawFlatString typedef; r=jonco

--HG--
extra : rebase_source : bdb9ef87e1b8a1b90b95863dddefe342d78dbc57
This commit is contained in:
Terrence Cole 2013-04-30 15:39:03 -07:00
parent 07d21c260d
commit a5286c2569
5 changed files with 7 additions and 10 deletions

View File

@ -262,7 +262,7 @@ AtomizeAndTakeOwnership(JSContext *cx, const jschar *tbchars, size_t length,
AutoEnterAtomsCompartment ac(cx);
RawFlatString flat = js_NewString<CanGC>(cx, const_cast<jschar*>(tbchars), length);
JSFlatString *flat = js_NewString<CanGC>(cx, const_cast<jschar*>(tbchars), length);
if (!flat) {
js_free((void*)tbchars);
return NULL;
@ -306,7 +306,7 @@ AtomizeAndCopyChars(JSContext *cx, const jschar *tbchars, size_t length, InternB
AutoEnterAtomsCompartment ac(cx);
RawFlatString flat = js_NewStringCopyN<allowGC>(cx, tbchars, length);
JSFlatString *flat = js_NewStringCopyN<allowGC>(cx, tbchars, length);
if (!flat)
return NULL;

View File

@ -122,9 +122,9 @@ JSONParser::readString()
jschar c = *current++;
if (c == '"') {
RawFlatString str = (ST == JSONParser::PropertyName)
? buffer.finishAtom()
: buffer.finishString();
JSFlatString *str = (ST == JSONParser::PropertyName)
? buffer.finishAtom()
: buffer.finishString();
if (!str)
return token(OOM);
return stringToken(str);

View File

@ -30,7 +30,6 @@ ForwardDeclareJS(LinearString);
class JSStableString;
ForwardDeclareJS(InlineString);
class JSRope;
ForwardDeclareJS(FlatString);
namespace js {

View File

@ -38,7 +38,7 @@ StringBuffer::extractWellSized()
return buf;
}
RawFlatString
JSFlatString *
StringBuffer::finishString()
{
JSContext *cx = context();

View File

@ -14,8 +14,6 @@
#include "js/Vector.h"
ForwardDeclareJS(FlatString);
namespace js {
/*
@ -88,7 +86,7 @@ class StringBuffer
* Creates a string from the characters in this buffer, then (regardless
* whether string creation succeeded or failed) empties the buffer.
*/
js::RawFlatString finishString();
JSFlatString *finishString();
/* Identical to finishString() except that an atom is created. */
JSAtom *finishAtom();