summaryrefslogtreecommitdiffstats
path: root/js/src/jsexn.h
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-17 16:58:26 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-17 16:58:26 +0100
commit566f1ff8e70f67181fc933a016011f062749170f (patch)
tree5b3f907bfe64bf0c24f9817839ff468b18748b6d /js/src/jsexn.h
parent0a815a6f1117caa829937b5ad8e306481a9f896d (diff)
downloadUXP-566f1ff8e70f67181fc933a016011f062749170f.tar
UXP-566f1ff8e70f67181fc933a016011f062749170f.tar.gz
UXP-566f1ff8e70f67181fc933a016011f062749170f.tar.lz
UXP-566f1ff8e70f67181fc933a016011f062749170f.tar.xz
UXP-566f1ff8e70f67181fc933a016011f062749170f.zip
Handle the now ordinary error prototype object in stack
Diffstat (limited to 'js/src/jsexn.h')
-rw-r--r--js/src/jsexn.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/src/jsexn.h b/js/src/jsexn.h
index a63c70909..ae6335209 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;