gecko-dev/dom/promise
Boris Zbarsky a6fdc48869 Bug 1436276. Bindings should create their return promises in the current compartment even when called over Xrays. r=bholley
These are cases that are implementing the "convert an exception to a Promise"
steps of the Web IDL spec.  Typically the exception is thrown in the current
compartment; the Promise returned should simply match that.  Otherwise we can
end up with a situation in which the promise doesn't actaully have access to
its rejection value, which will cause problems if someone uses then() on the
promise: the return value of the then() call will get a sanitized exception
instead of the real one.

We _could_ try to match the actual compartment of the exception, in theory.
But it's not clear why this would be preferable to using the current
compartment, even if there were cases in which the exception _doesn't_ match
the current compartment.  Which there likely are not.

MozReview-Commit-ID: Ac2BHIHxfvY

--HG--
rename : dom/promise/tests/test_promise_argument.html => dom/promise/tests/test_promise_retval.html
rename : dom/promise/tests/test_promise_argument_xrays.html => dom/promise/tests/test_promise_retval_xrays.html
2018-02-10 01:34:10 -05:00
..
tests Bug 1436276. Bindings should create their return promises in the current compartment even when called over Xrays. r=bholley 2018-02-10 01:34:10 -05:00
Promise.cpp Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Promise.h Bug 1120178 - Migrate DOMError to DOMExtension in FileReader, IndexedDB, DOMRequest and so on, r=smaug 2017-08-06 20:47:00 +03:00
PromiseDebugging.cpp Bug 1434686 part 4. Use IgnoreErrors() in dom/. r=mystor 2018-02-01 14:21:14 -05:00
PromiseDebugging.h Bug 1432963 - Fixing workers headers - part 14 - WorkerPrivate without workers namespace, r=smaug 2018-01-31 08:24:08 +01:00
PromiseNativeHandler.h Bug 1299887 Use a PromiseNativeHandler shim to ensure real PromiseNativeHandlers are released when the Promise settles. r=bz 2016-09-06 14:38:13 -07:00
PromiseWindowProxy.cpp Bug 1409115 - Fix leaks by adding promise window proxy. r=bkelly 2017-12-06 16:48:18 -08:00
PromiseWindowProxy.h Bug 1409115 - Fix leaks by adding promise window proxy. r=bkelly 2017-12-06 16:48:18 -08:00
PromiseWorkerProxy.h Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00
moz.build Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00