зеркало из https://github.com/mozilla/gecko-dev.git
Bug 797806 - Helper method to handle stringified JSON in C++, part2, r=khuey
This commit is contained in:
Родитель
39ef9c4b1c
Коммит
dd922cba69
|
@ -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"
|
||||
|
|
Загрузка…
Ссылка в новой задаче