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

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

Issue 1413503007: Provide a counter for thrown JavaScript errors per context (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moved initialization Created 5 years, 1 month 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/factory.cc ('k') | no next file » | 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.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/conversions.h" 9 #include "src/conversions.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 HandleScope scope(isolate); 300 HandleScope scope(isolate);
301 DCHECK(args.length() == 4); 301 DCHECK(args.length() == 4);
302 CONVERT_INT32_ARG_CHECKED(template_index, 0); 302 CONVERT_INT32_ARG_CHECKED(template_index, 0);
303 CONVERT_ARG_HANDLE_CHECKED(String, arg0, 1); 303 CONVERT_ARG_HANDLE_CHECKED(String, arg0, 1);
304 CONVERT_ARG_HANDLE_CHECKED(String, arg1, 2); 304 CONVERT_ARG_HANDLE_CHECKED(String, arg1, 2);
305 CONVERT_ARG_HANDLE_CHECKED(String, arg2, 3); 305 CONVERT_ARG_HANDLE_CHECKED(String, arg2, 3);
306 Handle<String> result; 306 Handle<String> result;
307 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 307 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
308 isolate, result, 308 isolate, result,
309 MessageTemplate::FormatMessage(template_index, arg0, arg1, arg2)); 309 MessageTemplate::FormatMessage(template_index, arg0, arg1, arg2));
310 isolate->native_context()->IncrementErrorsThrown();
310 return *result; 311 return *result;
311 } 312 }
312 313
313 314
314 #define CALLSITE_GET(NAME, RETURN) \ 315 #define CALLSITE_GET(NAME, RETURN) \
315 RUNTIME_FUNCTION(Runtime_CallSite##NAME##RT) { \ 316 RUNTIME_FUNCTION(Runtime_CallSite##NAME##RT) { \
316 HandleScope scope(isolate); \ 317 HandleScope scope(isolate); \
317 DCHECK(args.length() == 1); \ 318 DCHECK(args.length() == 1); \
318 CONVERT_ARG_HANDLE_CHECKED(JSObject, call_site_obj, 0); \ 319 CONVERT_ARG_HANDLE_CHECKED(JSObject, call_site_obj, 0); \
319 Handle<String> result; \ 320 Handle<String> result; \
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 HandleScope scope(isolate); 442 HandleScope scope(isolate);
442 DCHECK_EQ(1, args.length()); 443 DCHECK_EQ(1, args.length());
443 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 444 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
444 Handle<String> callsite = RenderCallSite(isolate, object); 445 Handle<String> callsite = RenderCallSite(isolate, object);
445 THROW_NEW_ERROR_RETURN_FAILURE( 446 THROW_NEW_ERROR_RETURN_FAILURE(
446 isolate, NewTypeError(MessageTemplate::kCalledNonCallable, callsite)); 447 isolate, NewTypeError(MessageTemplate::kCalledNonCallable, callsite));
447 } 448 }
448 449
449 } // namespace internal 450 } // namespace internal
450 } // namespace v8 451 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698