mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 01:57:30 +09:00
[js xpconnect] Fix error handling in xpc::CreateSandboxObject
This commit is contained in:
parent
8f31479968
commit
ec8793a094
2 changed files with 5 additions and 2 deletions
|
|
@ -1264,7 +1264,10 @@ xpc::CreateSandboxObject(JSContext* cx, MutableHandleValue vp, nsISupports* prin
|
||||||
// about:memory may use that information
|
// about:memory may use that information
|
||||||
xpc::SetLocationForGlobal(sandbox, options.sandboxName);
|
xpc::SetLocationForGlobal(sandbox, options.sandboxName);
|
||||||
|
|
||||||
xpc::SetSandboxMetadata(cx, sandbox, options.metadata);
|
nsresult rv = xpc::SetSandboxMetadata(cx, sandbox, options.metadata);
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
JS_FireOnNewGlobalObject(cx, sandbox);
|
JS_FireOnNewGlobalObject(cx, sandbox);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3111,7 +3111,7 @@ nsresult
|
||||||
GetSandboxMetadata(JSContext* cx, JS::HandleObject sandboxArg,
|
GetSandboxMetadata(JSContext* cx, JS::HandleObject sandboxArg,
|
||||||
JS::MutableHandleValue rval);
|
JS::MutableHandleValue rval);
|
||||||
|
|
||||||
nsresult
|
[[nodiscard]] nsresult
|
||||||
SetSandboxMetadata(JSContext* cx, JS::HandleObject sandboxArg,
|
SetSandboxMetadata(JSContext* cx, JS::HandleObject sandboxArg,
|
||||||
JS::HandleValue metadata);
|
JS::HandleValue metadata);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue