mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 14:57:32 +09:00
Issue #1322 - Part 1: Remove the DOM Promise guts.
This removes all the parts guarded by SPIDERMONKEY_PROMISE
This commit is contained in:
parent
ad9793b896
commit
40f99b202a
27 changed files with 66 additions and 4009 deletions
|
|
@ -1206,13 +1206,6 @@ xpc::CreateSandboxObject(JSContext* cx, MutableHandleValue vp, nsISupports* prin
|
|||
|
||||
if (!options.globalProperties.DefineInSandbox(cx, sandbox))
|
||||
return NS_ERROR_XPC_UNEXPECTED;
|
||||
|
||||
#ifndef SPIDERMONKEY_PROMISE
|
||||
// Promise is supposed to be part of ES, and therefore should appear on
|
||||
// every global.
|
||||
if (!dom::PromiseBinding::GetConstructorObject(cx))
|
||||
return NS_ERROR_XPC_UNEXPECTED;
|
||||
#endif // SPIDERMONKEY_PROMISE
|
||||
}
|
||||
|
||||
// We handle the case where the context isn't in a compartment for the
|
||||
|
|
|
|||
|
|
@ -799,7 +799,6 @@ XPCConvert::NativeInterface2JSObject(MutableHandleValue d,
|
|||
return CreateHolderIfNeeded(flat, d, dest);
|
||||
}
|
||||
|
||||
#ifdef SPIDERMONKEY_PROMISE
|
||||
if (iid->Equals(NS_GET_IID(nsISupports))) {
|
||||
// Check for a Promise being returned via nsISupports. In that
|
||||
// situation, we want to dig out its underlying JS object and return
|
||||
|
|
@ -812,7 +811,6 @@ XPCConvert::NativeInterface2JSObject(MutableHandleValue d,
|
|||
return CreateHolderIfNeeded(flat, d, dest);
|
||||
}
|
||||
}
|
||||
#endif // SPIDERMONKEY_PROMISE
|
||||
|
||||
// Don't double wrap CPOWs. This is a temporary measure for compatibility
|
||||
// with objects that don't provide necessary QIs (such as objects under
|
||||
|
|
@ -955,7 +953,6 @@ XPCConvert::JSObject2NativeInterface(void** dest, HandleObject src,
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef SPIDERMONKEY_PROMISE
|
||||
// Deal with Promises being passed as nsISupports. In that situation we
|
||||
// want to create a dom::Promise and use that.
|
||||
if (iid->Equals(NS_GET_IID(nsISupports))) {
|
||||
|
|
@ -966,7 +963,6 @@ XPCConvert::JSObject2NativeInterface(void** dest, HandleObject src,
|
|||
return p && NS_SUCCEEDED(p->QueryInterface(*iid, dest));
|
||||
}
|
||||
}
|
||||
#endif // SPIDERMONKEY_PROMISE
|
||||
}
|
||||
|
||||
RefPtr<nsXPCWrappedJS> wrapper;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue