summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/wrappers/XrayWrapper.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-20 10:05:23 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-03-20 10:07:06 +0100
commit7197b308fb97cd8ab7a972df6a3a17a7a265b594 (patch)
treee6a36f10a28710bac1b901915a643ce398580cdf /js/xpconnect/wrappers/XrayWrapper.cpp
parent173a526ec0bedec17f35cc838b9c7d47a5ce13b7 (diff)
parenta413cf72888dcb5197ba44aba547b8d496231cff (diff)
downloadUXP-7197b308fb97cd8ab7a972df6a3a17a7a265b594.tar
UXP-7197b308fb97cd8ab7a972df6a3a17a7a265b594.tar.gz
UXP-7197b308fb97cd8ab7a972df6a3a17a7a265b594.tar.lz
UXP-7197b308fb97cd8ab7a972df6a3a17a7a265b594.tar.xz
UXP-7197b308fb97cd8ab7a972df6a3a17a7a265b594.zip
Make RegExp.prototype return a regular object instead of an instance.
This resolves #77. Merged remote-tracking branch 'janek/js_regexp_ordinary-object_1'
Diffstat (limited to 'js/xpconnect/wrappers/XrayWrapper.cpp')
-rw-r--r--js/xpconnect/wrappers/XrayWrapper.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/js/xpconnect/wrappers/XrayWrapper.cpp b/js/xpconnect/wrappers/XrayWrapper.cpp
index 8011d207f..48a9fdc68 100644
--- a/js/xpconnect/wrappers/XrayWrapper.cpp
+++ b/js/xpconnect/wrappers/XrayWrapper.cpp
@@ -636,10 +636,6 @@ JSXrayTraits::resolveOwnProperty(JSContext* cx, const Wrapper& jsWrapper,
return true;
}
- // 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());
@@ -881,10 +877,6 @@ JSXrayTraits::enumerateNames(JSContext* cx, HandleObject wrapper, unsigned flags
if (!props.append(GetJSIDByIndex(cx, XPCJSContext::IDX_CONSTRUCTOR)))
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());