mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
bindings: Convert certain Exceptions into Promise rejections (#32923)
* Impl promise exception to rejection for methods Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Impl promise exception to rejection for getters Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Impl promise exception to rejection for static methods Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add tests for exception to rejection Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
fd83281657
commit
f3bec0aed3
11 changed files with 291 additions and 20 deletions
|
@ -574,6 +574,16 @@ interface TestBinding {
|
|||
undefined promiseRejectWithTypeError(Promise<any> p, USVString message);
|
||||
undefined resolvePromiseDelayed(Promise<any> p, DOMString value, unsigned long long ms);
|
||||
|
||||
[Throws]
|
||||
static Promise<any> staticThrowToRejectPromise();
|
||||
[Throws]
|
||||
Promise<any> methodThrowToRejectPromise();
|
||||
[Throws]
|
||||
readonly attribute Promise<any> getterThrowToRejectPromise;
|
||||
|
||||
static Promise<any> staticInternalThrowToRejectPromise([EnforceRange] unsigned long long arg);
|
||||
Promise<any> methodInternalThrowToRejectPromise([EnforceRange] unsigned long long arg);
|
||||
|
||||
undefined panic();
|
||||
|
||||
GlobalScope entryGlobal();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue