gecko-dev/js/xpconnect
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
..
crashtests Bug 721910 - Add crashtest. 2017-12-05 11:02:57 -05:00
idl Bug 1435483 part 3. Remove nsIXPCException. r=qdot 2018-02-05 16:34:04 -05:00
loader Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
public Bug 1409598 - Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj. 2017-10-18 13:17:26 +11:00
shell Backed out 3 changesets (bug 1430857) for breaking tests on Windows Code Coverage builds a=backout 2018-02-07 15:02:58 +02:00
src 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
tests Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-02-08 21:36:33 +02:00
wrappers Bug 1435596. Give cross-origin objects (windows and locations) a 'then' property in all cases. r=bholley 2018-02-10 01:21:59 -05:00
moz.build