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

Side by Side Diff: src/runtime/runtime-internal.cc

Issue 1281833002: Rewrite Error.prototype.toString in C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test case Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/error-constructors.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 247
248 RUNTIME_FUNCTION(Runtime_MessageGetScript) { 248 RUNTIME_FUNCTION(Runtime_MessageGetScript) {
249 SealHandleScope shs(isolate); 249 SealHandleScope shs(isolate);
250 DCHECK(args.length() == 1); 250 DCHECK(args.length() == 1);
251 CONVERT_ARG_CHECKED(JSMessageObject, message, 0); 251 CONVERT_ARG_CHECKED(JSMessageObject, message, 0);
252 return message->script(); 252 return message->script();
253 } 253 }
254 254
255 255
256 RUNTIME_FUNCTION(Runtime_ErrorToStringRT) {
257 HandleScope scope(isolate);
258 DCHECK(args.length() == 1);
259 CONVERT_ARG_HANDLE_CHECKED(JSObject, error, 0);
260 Handle<String> result;
261 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
262 isolate, result,
263 isolate->error_tostring_helper()->Stringify(isolate, error));
264 return *result;
265 }
266
267
256 RUNTIME_FUNCTION(Runtime_FormatMessageString) { 268 RUNTIME_FUNCTION(Runtime_FormatMessageString) {
257 HandleScope scope(isolate); 269 HandleScope scope(isolate);
258 DCHECK(args.length() == 4); 270 DCHECK(args.length() == 4);
259 CONVERT_INT32_ARG_CHECKED(template_index, 0); 271 CONVERT_INT32_ARG_CHECKED(template_index, 0);
260 CONVERT_ARG_HANDLE_CHECKED(String, arg0, 1); 272 CONVERT_ARG_HANDLE_CHECKED(String, arg0, 1);
261 CONVERT_ARG_HANDLE_CHECKED(String, arg1, 2); 273 CONVERT_ARG_HANDLE_CHECKED(String, arg1, 2);
262 CONVERT_ARG_HANDLE_CHECKED(String, arg2, 3); 274 CONVERT_ARG_HANDLE_CHECKED(String, arg2, 3);
263 Handle<String> result; 275 Handle<String> result;
264 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 276 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
265 isolate, result, 277 isolate, result,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 377 }
366 378
367 379
368 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) { 380 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) {
369 HandleScope shs(isolate); 381 HandleScope shs(isolate);
370 return isolate->heap()->code_stub_exports_object(); 382 return isolate->heap()->code_stub_exports_object();
371 } 383 }
372 384
373 } // namespace internal 385 } // namespace internal
374 } // namespace v8 386 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/error-constructors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698