From da4c7e7ed675c3bf405668739c3012d140856109 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:42 +0200 Subject: Adding upstream version 126.0. Signed-off-by: Daniel Baumann --- dom/ipc/jsactor/JSActor.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'dom/ipc/jsactor') diff --git a/dom/ipc/jsactor/JSActor.cpp b/dom/ipc/jsactor/JSActor.cpp index 03926fee04..2c706ca515 100644 --- a/dom/ipc/jsactor/JSActor.cpp +++ b/dom/ipc/jsactor/JSActor.cpp @@ -441,14 +441,8 @@ void JSActor::QueryHandler::ResolvedCallback(JSContext* aCx, return; } - Maybe data{std::in_place}; - data->InitScope(JS::StructuredCloneScope::DifferentProcess); - - IgnoredErrorResult error; - data->Write(aCx, aValue, error); - if (NS_WARN_IF(error.Failed())) { - JS_ClearPendingException(aCx); - + Maybe data = TryClone(aCx, aValue); + if (!data) { nsAutoCString msg; msg.Append(mActor->Name()); msg.Append(':'); -- cgit v1.2.3