Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-08-24 12:49:42 +0300
committerMichaël Zasso <targos@protonmail.com>2018-08-28 15:11:20 +0300
commit08aad66411a11218674f40a393e2af91cc26ee40 (patch)
treead555d7cd37d81e9f8554d270889699605b31d3e /deps
parent5081d9663f1ce50d733762b64278d99baa810c04 (diff)
src,deps: add isolate parameter to String::Concat
Partially backport an upstream commit that deprecates String::Concat without the isolate parameter. This overload has already been removed in V8 7.0. PR-URL: https://github.com/nodejs/node/pull/22521 Refs: https://github.com/v8/v8/commit/8a011b57d8b26e9cfe1c20a2ef26adb14be6ecc2 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/include/v8.h6
-rw-r--r--deps/v8/src/api.cc11
2 files changed, 13 insertions, 4 deletions
diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h
index b5bb85ca8a4..362bece11f6 100644
--- a/deps/v8/include/v8.h
+++ b/deps/v8/include/v8.h
@@ -2901,7 +2901,11 @@ class V8_EXPORT String : public Name {
* Creates a new string by concatenating the left and the right strings
* passed in as parameters.
*/
- static Local<String> Concat(Local<String> left, Local<String> right);
+ static Local<String> Concat(Isolate* isolate, Local<String> left,
+ Local<String> right);
+ static V8_DEPRECATE_SOON("Use Isolate* version",
+ Local<String> Concat(Local<String> left,
+ Local<String> right));
/**
* Creates a new external string using the data defined in the given
diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc
index fbd0dbc043b..5f8f3752008 100644
--- a/deps/v8/src/api.cc
+++ b/deps/v8/src/api.cc
@@ -6646,10 +6646,10 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
return result;
}
-
-Local<String> v8::String::Concat(Local<String> left, Local<String> right) {
+Local<String> v8::String::Concat(Isolate* v8_isolate, Local<String> left,
+ Local<String> right) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
i::Handle<i::String> left_string = Utils::OpenHandle(*left);
- i::Isolate* isolate = left_string->GetIsolate();
ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
LOG_API(isolate, String, Concat);
i::Handle<i::String> right_string = Utils::OpenHandle(*right);
@@ -6663,6 +6663,11 @@ Local<String> v8::String::Concat(Local<String> left, Local<String> right) {
return Utils::ToLocal(result);
}
+Local<String> v8::String::Concat(Local<String> left, Local<String> right) {
+ i::Handle<i::String> left_string = Utils::OpenHandle(*left);
+ i::Isolate* isolate = left_string->GetIsolate();
+ return Concat(reinterpret_cast<Isolate*>(isolate), left, right);
+}
MaybeLocal<String> v8::String::NewExternalTwoByte(
Isolate* isolate, v8::String::ExternalStringResource* resource) {