Chromium Code Reviews

Unified Diff: src/bootstrapper.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: Adaptations to feedback and now all V8 exceptions are counted Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | src/contexts.h » ('j') | src/contexts.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 0b63ceb8f980bd336b027ba46b5c067a656a19d6..9cf9253ad4ee00fd70e109764abea6f6bedf7e45 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -373,6 +373,10 @@ static void SetObjectPrototype(Handle<JSObject> object, Handle<Object> proto) {
void Bootstrapper::DetachGlobal(Handle<Context> env) {
+ // add thrown javascript exceptions
Michael Starzinger 2015/10/30 12:27:10 nit: Please capitalize and punctuate comment.
Michael Hablich 2015/10/30 15:55:02 I removed the comment entirely because the code is
+ env->GetIsolate()->counters()->exceptions_thrown_per_context()->AddSample(
+ env->GetExceptionsThrown());
+
Factory* factory = env->GetIsolate()->factory();
Handle<JSGlobalProxy> global_proxy(JSGlobalProxy::cast(env->global_proxy()));
global_proxy->set_native_context(*factory->null_value());
« no previous file with comments | « no previous file | src/contexts.h » ('j') | src/contexts.cc » ('J')

Powered by Google App Engine