From 114794557687aebca601c38ba0f0a52a43b44d4a Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 15 Mar 2018 21:12:39 +0100 Subject: Close iterator after error in Promise.{all,race} Issue #17 --- js/src/jsapi.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/src/jsapi.h') diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 2d6ff462c..a93852fa5 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -6166,6 +6166,12 @@ class MOZ_STACK_CLASS JS_PUBLIC_API(ForOfIterator) { */ bool next(JS::MutableHandleValue val, bool* done); + /** + * Close the iterator. + * For the case that completion type is throw. + */ + void closeThrow(); + /** * If initialized with throwOnNonCallable = false, check whether * the value is iterable. -- cgit v1.2.3 From 0a815a6f1117caa829937b5ad8e306481a9f896d Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sat, 17 Mar 2018 16:56:31 +0100 Subject: Use ordinary objects for Error prototypes --- js/src/jsapi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/src/jsapi.h') diff --git a/js/src/jsapi.h b/js/src/jsapi.h index a93852fa5..332ce8562 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -650,7 +650,8 @@ typedef enum JSExnType { JSEXN_DEBUGGEEWOULDRUN, JSEXN_WASMCOMPILEERROR, JSEXN_WASMRUNTIMEERROR, - JSEXN_WARN, + JSEXN_ERROR_LIMIT, + JSEXN_WARN = JSEXN_ERROR_LIMIT, JSEXN_LIMIT } JSExnType; -- cgit v1.2.3 From 75db97cb3772fc0693947ec17c5954a04cb234a8 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 19 Mar 2018 14:48:24 +0100 Subject: Bug 1320388: Move JSFunction::HAS_REST to JSScript and LazyScript Issue #78 [Depends on] Bug 883377: Implement ES6 function "name" property semantics --- js/src/jsapi.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'js/src/jsapi.h') diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 332ce8562..cbef0f8fb 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -875,11 +875,7 @@ class MOZ_STACK_CLASS SourceBufferHolder final #define JSFUN_CONSTRUCTOR 0x400 /* native that can be called as a ctor */ -// 0x800 /* Unused */ - -#define JSFUN_HAS_REST 0x1000 /* function has ...rest parameter. */ - -#define JSFUN_FLAGS_MASK 0x1e00 /* | of all the JSFUN_* flags */ +#define JSFUN_FLAGS_MASK 0x600 /* | of all the JSFUN_* flags */ /* * If set, will allow redefining a non-configurable property, but only on a -- cgit v1.2.3 From b311e8fa718e2a32805c25847781cc8a6a0541bd Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 25 Mar 2018 16:22:38 +0200 Subject: Bug 1342553, Bug 1343072, Bug 1344753 (details in the description) Bug 1342553 - Part 0.1: Use try-catch for IteratorClose in for-of Bug 1343072 - Update HasLiveStackValueAtDepth to follow the change in JSTRY_FOR_OF Bug 1344753 - Update for-of stack depth in ControlFlowGenerator::processWhileOrForInLoop Issue #74 --- js/src/jsapi.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'js/src/jsapi.h') diff --git a/js/src/jsapi.h b/js/src/jsapi.h index cbef0f8fb..5523dfa1d 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -6622,5 +6622,14 @@ SetGetPerformanceGroupsCallback(JSContext*, GetGroupsCallback, void*); } /* namespace js */ +namespace js { + +enum class CompletionKind { + Normal, + Return, + Throw +}; + +} /* namespace js */ #endif /* jsapi_h */ -- cgit v1.2.3