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)); |
} |