diff options
author | Michaël Zasso <targos@protonmail.com> | 2018-09-21 09:14:51 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-09-22 18:29:25 +0200 |
commit | 0e7ddbd3d7e9439c67573b854c49cf82c398ae82 (patch) | |
tree | 2afe372acde921cb57ddb3444ff00c5adef8848c /deps/v8/src/builtins/builtins-string.cc | |
parent | 13245dc50da4cb7443c39ef6c68d419d5e6336d4 (diff) | |
download | android-node-v8-0e7ddbd3d7e9439c67573b854c49cf82c398ae82.tar.gz android-node-v8-0e7ddbd3d7e9439c67573b854c49cf82c398ae82.tar.bz2 android-node-v8-0e7ddbd3d7e9439c67573b854c49cf82c398ae82.zip |
deps: update V8 to 7.0.276.20
PR-URL: https://github.com/nodejs/node/pull/22754
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/src/builtins/builtins-string.cc')
-rw-r--r-- | deps/v8/src/builtins/builtins-string.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/deps/v8/src/builtins/builtins-string.cc b/deps/v8/src/builtins/builtins-string.cc index e52fbd577d..0dafa230b5 100644 --- a/deps/v8/src/builtins/builtins-string.cc +++ b/deps/v8/src/builtins/builtins-string.cc @@ -2,13 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/builtins/builtins-utils.h" +#include "src/builtins/builtins-utils-inl.h" #include "src/builtins/builtins.h" #include "src/conversions.h" #include "src/counters.h" #include "src/objects-inl.h" +#ifdef V8_INTL_SUPPORT +#include "src/objects/intl-objects.h" +#endif #include "src/regexp/regexp-utils.h" -#include "src/string-builder.h" +#include "src/string-builder-inl.h" #include "src/string-case.h" #include "src/unicode-inl.h" #include "src/unicode.h" @@ -190,10 +193,18 @@ BUILTIN(StringPrototypeLastIndexOf) { // // This function is implementation specific. For now, we do not // do anything locale specific. -// If internationalization is enabled, then intl.js will override this function -// and provide the proper functionality, so this is just a fallback. BUILTIN(StringPrototypeLocaleCompare) { HandleScope handle_scope(isolate); +#ifdef V8_INTL_SUPPORT + TO_THIS_STRING(str1, "String.prototype.localeCompare"); + Handle<String> str2; + ASSIGN_RETURN_FAILURE_ON_EXCEPTION( + isolate, str2, Object::ToString(isolate, args.atOrUndefined(isolate, 1))); + RETURN_RESULT_OR_FAILURE( + isolate, Intl::StringLocaleCompare(isolate, str1, str2, + args.atOrUndefined(isolate, 2), + args.atOrUndefined(isolate, 3))); +#else DCHECK_EQ(2, args.length()); TO_THIS_STRING(str1, "String.prototype.localeCompare"); @@ -235,6 +246,7 @@ BUILTIN(StringPrototypeLocaleCompare) { } return Smi::FromInt(str1_length - str2_length); +#endif // !V8_INTL_SUPPORT } #ifndef V8_INTL_SUPPORT |