Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Unified Diff: src/runtime/runtime-strings.cc

Issue 2189663002: Add a flag to help platform ports bootstrap V8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename flag Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-strings.cc
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc
index 8bfa12c519564dec459fba4c8a47b067eb35e2a9..761176d54a3ae8f83ca58b7f7301d07327fc9db2 100644
--- a/src/runtime/runtime-strings.cc
+++ b/src/runtime/runtime-strings.cc
@@ -272,9 +272,15 @@ RUNTIME_FUNCTION(Runtime_SubString) {
RUNTIME_FUNCTION(Runtime_StringAdd) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
- CONVERT_ARG_HANDLE_CHECKED(String, str1, 0);
- CONVERT_ARG_HANDLE_CHECKED(String, str2, 1);
+ CONVERT_ARG_HANDLE_CHECKED(Object, obj1, 0);
+ CONVERT_ARG_HANDLE_CHECKED(Object, obj2, 1);
isolate->counters()->string_add_runtime()->Increment();
+ MaybeHandle<String> maybe_str1(Object::ToString(isolate, obj1));
+ MaybeHandle<String> maybe_str2(Object::ToString(isolate, obj2));
+ Handle<String> str1;
+ Handle<String> str2;
+ maybe_str1.ToHandle(&str1);
+ maybe_str2.ToHandle(&str2);
RETURN_RESULT_OR_FAILURE(isolate,
isolate->factory()->NewConsString(str1, str2));
}
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698