mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 797806 - Helper method to handle stringified JSON in C++, part2, r=khuey
This commit is contained in:
parent
4a3f200675
commit
c3acd4988e
@ -751,6 +751,9 @@ MainThreadDictionaryBase::ParseJSON(const nsAString& aJSON,
|
||||
JSObject* global = JS_GetGlobalObject(cx);
|
||||
aAr.construct(cx);
|
||||
aAc.construct(cx, global);
|
||||
if (aJSON.IsEmpty()) {
|
||||
return cx;
|
||||
}
|
||||
if (!JS_ParseJSON(cx,
|
||||
static_cast<const jschar*>(PromiseFlatString(aJSON).get()),
|
||||
aJSON.Length(), &aVal)) {
|
||||
|
@ -5405,9 +5405,6 @@ class CGDictionary(CGThing):
|
||||
" \n" +
|
||||
(" bool Init(const nsAString& aJSON)\n"
|
||||
" {\n"
|
||||
" if (aJSON.IsEmpty()) {\n"
|
||||
" return true;\n"
|
||||
" }\n"
|
||||
" mozilla::Maybe<JSAutoRequest> ar;\n"
|
||||
" mozilla::Maybe<JSAutoCompartment> ac;\n"
|
||||
" jsval json = JSVAL_VOID;\n"
|
||||
|
Loading…
Reference in New Issue
Block a user