diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-12 03:19:09 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-12 03:19:09 +0000 |
commit | e95089d84ac71276bd059e52293ab42c2259d89e (patch) | |
tree | 38c9c7a6b5f482d81bdfec1cf81ebc7bbb234800 /js/src/jsstr.cpp | |
parent | e34920575d6dac353cb3d8a5d1b9c11ae05c5a8c (diff) | |
download | UXP-e95089d84ac71276bd059e52293ab42c2259d89e.tar UXP-e95089d84ac71276bd059e52293ab42c2259d89e.tar.gz UXP-e95089d84ac71276bd059e52293ab42c2259d89e.tar.lz UXP-e95089d84ac71276bd059e52293ab42c2259d89e.tar.xz UXP-e95089d84ac71276bd059e52293ab42c2259d89e.zip |
Make use of ArrayObjects in favor of generic JS objects.
ArrayObjects has been a thing for years but been under-used. About time
they are used where prudent.
Diffstat (limited to 'js/src/jsstr.cpp')
-rw-r--r-- | js/src/jsstr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp index 7765b1197..d7db5129d 100644 --- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -2369,7 +2369,7 @@ js::str_replace_string_raw(JSContext* cx, HandleString string, HandleString patt } // ES 2016 draft Mar 25, 2016 21.1.3.17 steps 4, 8, 12-18. -static JSObject* +static ArrayObject* SplitHelper(JSContext* cx, HandleLinearString str, uint32_t limit, HandleLinearString sep, HandleObjectGroup group) { @@ -2466,7 +2466,7 @@ SplitHelper(JSContext* cx, HandleLinearString str, uint32_t limit, HandleLinearS } // Fast-path for splitting a string into a character array via split(""). -static JSObject* +static ArrayObject* CharSplitHelper(JSContext* cx, HandleLinearString str, uint32_t limit, HandleObjectGroup group) { size_t strLength = str->length(); @@ -2491,7 +2491,7 @@ CharSplitHelper(JSContext* cx, HandleLinearString str, uint32_t limit, HandleObj } // ES 2016 draft Mar 25, 2016 21.1.3.17 steps 4, 8, 12-18. -JSObject* +ArrayObject* js::str_split_string(JSContext* cx, HandleObjectGroup group, HandleString str, HandleString sep, uint32_t limit) { |