Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index b6176974909d5937e9da0d030a6f74177e395167..067a2963b48e4550207f01669f9d8d7ed9bd9ed8 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -305,6 +305,21 @@ RUNTIME_FUNCTION(Runtime_MessageGetScript) { |
} |
+RUNTIME_FUNCTION(Runtime_FormatMessageString) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 4); |
+ CONVERT_INT32_ARG_CHECKED(template_index, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(String, arg0, 1); |
+ CONVERT_ARG_HANDLE_CHECKED(String, arg1, 2); |
+ CONVERT_ARG_HANDLE_CHECKED(String, arg2, 3); |
+ Handle<String> result; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
+ isolate, result, |
+ MessageTemplate::FormatMessage(template_index, arg0, arg1, arg2)); |
+ return *result; |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_IS_VAR) { |
UNREACHABLE(); // implemented as macro in the parser |
return NULL; |