diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-27 15:57:18 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-27 15:57:18 +0200 |
commit | d990d8ab2cade6c928e8bbe56ae038d020cef599 (patch) | |
tree | c7561ae0f303cb0d4a7a7507178531b4852e4dea /js/xpconnect/wrappers/XrayWrapper.cpp | |
parent | 0c36b27511c1fbca594f0426c493ef601fda3e4c (diff) | |
parent | 8d5ec757ece850fb7ad5c712868f305636e41177 (diff) | |
download | uxp-d990d8ab2cade6c928e8bbe56ae038d020cef599.tar.gz |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into js_array_values_1
Diffstat (limited to 'js/xpconnect/wrappers/XrayWrapper.cpp')
-rw-r--r-- | js/xpconnect/wrappers/XrayWrapper.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/js/xpconnect/wrappers/XrayWrapper.cpp b/js/xpconnect/wrappers/XrayWrapper.cpp index 5e537692d0..48a9fdc68e 100644 --- a/js/xpconnect/wrappers/XrayWrapper.cpp +++ b/js/xpconnect/wrappers/XrayWrapper.cpp @@ -636,18 +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); - // Grab the JSClass. We require all Xrayable classes to have a ClassSpec. const js::Class* clasp = js::GetObjectClass(target); MOZ_ASSERT(clasp->specDefined()); @@ -889,14 +877,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; - // Grab the JSClass. We require all Xrayable classes to have a ClassSpec. const js::Class* clasp = js::GetObjectClass(target); MOZ_ASSERT(clasp->specDefined()); |