mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 652438 - Add back OOM checks in JSString::getChars (r=waldo)
This commit is contained in:
parent
f52bbc7614
commit
c7e18b4a7b
@ -694,13 +694,17 @@ JS_STATIC_ASSERT(sizeof(JSStaticAtom) == sizeof(JSString));
|
||||
JS_ALWAYS_INLINE const jschar *
|
||||
JSString::getChars(JSContext *cx)
|
||||
{
|
||||
return ensureLinear(cx)->chars();
|
||||
if (JSLinearString *str = ensureLinear(cx))
|
||||
return str->chars();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
JS_ALWAYS_INLINE const jschar *
|
||||
JSString::getCharsZ(JSContext *cx)
|
||||
{
|
||||
return ensureFlat(cx)->chars();
|
||||
if (JSFlatString *str = ensureFlat(cx))
|
||||
return str->chars();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
JS_ALWAYS_INLINE JSLinearString *
|
||||
|
Loading…
Reference in New Issue
Block a user