mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1766647 - Check readString result in JS_ReadString r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D144887
This commit is contained in:
parent
f63f7b9128
commit
194a177317
@ -3613,8 +3613,11 @@ JS_PUBLIC_API bool JS_ReadString(JSStructuredCloneReader* r,
|
||||
}
|
||||
|
||||
if (tag == SCTAG_STRING) {
|
||||
str.set(r->readString(data));
|
||||
return true;
|
||||
if (JSString* s = r->readString(data)) {
|
||||
str.set(s);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
JS_ReportErrorNumberASCII(r->context(), GetErrorMessage, nullptr,
|
||||
|
Loading…
Reference in New Issue
Block a user