diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-17 16:58:26 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-17 16:58:26 +0100 |
commit | 566f1ff8e70f67181fc933a016011f062749170f (patch) | |
tree | 5b3f907bfe64bf0c24f9817839ff468b18748b6d /js/src/jsexn.h | |
parent | 0a815a6f1117caa829937b5ad8e306481a9f896d (diff) | |
download | uxp-566f1ff8e70f67181fc933a016011f062749170f.tar.gz |
Handle the now ordinary error prototype object in stack
Diffstat (limited to 'js/src/jsexn.h')
-rw-r--r-- | js/src/jsexn.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/js/src/jsexn.h b/js/src/jsexn.h index a63c70909e..ae6335209b 100644 --- a/js/src/jsexn.h +++ b/js/src/jsexn.h @@ -85,10 +85,17 @@ ExnTypeFromProtoKey(JSProtoKey key) { JSExnType type = static_cast<JSExnType>(key - JSProto_Error); MOZ_ASSERT(type >= JSEXN_ERR); - MOZ_ASSERT(type < JSEXN_WARN); + MOZ_ASSERT(type < JSEXN_ERROR_LIMIT); return type; } +static inline bool +IsErrorProtoKey(JSProtoKey key) +{ + JSExnType type = static_cast<JSExnType>(key - JSProto_Error); + return type >= JSEXN_ERR && type < JSEXN_ERROR_LIMIT; +} + class AutoClearPendingException { JSContext* cx; |