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

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

Issue 1087633005: Start migrating error message templates to the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix windows build Created 5 years, 8 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.h ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698