diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-17 16:59:17 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-17 16:59:17 +0100 |
commit | 4a4b951bfcf0e0b2323ea94735a1c9db7d08ecd7 (patch) | |
tree | 41611e0a309fe5ea4b5a99f18f9770bd3600b9f7 /js/xpconnect/wrappers | |
parent | 566f1ff8e70f67181fc933a016011f062749170f (diff) | |
download | UXP-4a4b951bfcf0e0b2323ea94735a1c9db7d08ecd7.tar UXP-4a4b951bfcf0e0b2323ea94735a1c9db7d08ecd7.tar.gz UXP-4a4b951bfcf0e0b2323ea94735a1c9db7d08ecd7.tar.lz UXP-4a4b951bfcf0e0b2323ea94735a1c9db7d08ecd7.tar.xz UXP-4a4b951bfcf0e0b2323ea94735a1c9db7d08ecd7.zip |
Simplify Error Xray code
Diffstat (limited to 'js/xpconnect/wrappers')
-rw-r--r-- | js/xpconnect/wrappers/XrayWrapper.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/js/xpconnect/wrappers/XrayWrapper.cpp b/js/xpconnect/wrappers/XrayWrapper.cpp index 5e537692d..8011d207f 100644 --- a/js/xpconnect/wrappers/XrayWrapper.cpp +++ b/js/xpconnect/wrappers/XrayWrapper.cpp @@ -636,14 +636,6 @@ JSXrayTraits::resolveOwnProperty(JSContext* cx, const Wrapper& jsWrapper, return true; } - // Handle the 'name' property for error prototypes. - if (IsErrorObjectKey(key) && id == GetJSIDByIndex(cx, XPCJSContext::IDX_NAME)) { - RootedId className(cx); - ProtoKeyToId(cx, key, &className); - FillPropertyDescriptor(desc, wrapper, 0, UndefinedValue()); - return JS_IdToValue(cx, className, desc.value()); - } - // Handle the 'lastIndex' property for RegExp prototypes. if (key == JSProto_RegExp && id == GetJSIDByIndex(cx, XPCJSContext::IDX_LASTINDEX)) return getOwnPropertyFromWrapperIfSafe(cx, wrapper, id, desc); @@ -889,10 +881,6 @@ JSXrayTraits::enumerateNames(JSContext* cx, HandleObject wrapper, unsigned flags if (!props.append(GetJSIDByIndex(cx, XPCJSContext::IDX_CONSTRUCTOR))) return false; - // For Error protoypes, add the 'name' property. - if (IsErrorObjectKey(key) && !props.append(GetJSIDByIndex(cx, XPCJSContext::IDX_NAME))) - return false; - // For RegExp protoypes, add the 'lastIndex' property. if (key == JSProto_RegExp && !props.append(GetJSIDByIndex(cx, XPCJSContext::IDX_LASTINDEX))) return false; |