зеркало из https://github.com/mozilla/gecko-dev.git
Bug 738956 - Wrap values in nsStructuredCloneContainer::InitFromVariant before passing them to JS_WriteStructuredClone. r=khuey
This commit is contained in:
Родитель
0e26f19b8f
Коммит
2d2091879c
|
@ -85,6 +85,7 @@ nsStructuredCloneContainer::InitFromVariant(nsIVariant *aData, JSContext *aCx)
|
|||
JSAutoRequest ar(aCx);
|
||||
JSAutoEnterCompartment ac;
|
||||
NS_ENSURE_STATE(ac.enter(aCx, JS_GetGlobalObject(aCx)));
|
||||
JS_WrapValue(aCx, &jsData);
|
||||
|
||||
nsCxPusher cxPusher;
|
||||
cxPusher.Push(aCx);
|
||||
|
|
|
@ -5909,6 +5909,7 @@ JS_WriteStructuredClone(JSContext *cx, jsval v, uint64_t **bufp, size_t *nbytesp
|
|||
{
|
||||
AssertNoGC(cx);
|
||||
CHECK_REQUEST(cx);
|
||||
assertSameCompartment(cx, v);
|
||||
|
||||
const JSStructuredCloneCallbacks *callbacks =
|
||||
optionalCallbacks ?
|
||||
|
@ -5924,6 +5925,7 @@ JS_StructuredClone(JSContext *cx, jsval v, jsval *vp,
|
|||
{
|
||||
AssertNoGC(cx);
|
||||
CHECK_REQUEST(cx);
|
||||
assertSameCompartment(cx, v);
|
||||
|
||||
const JSStructuredCloneCallbacks *callbacks =
|
||||
optionalCallbacks ?
|
||||
|
|
Загрузка…
Ссылка в новой задаче