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

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: Per context counting implemented Created 5 years, 2 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 | « 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
+ 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
This is Rietveld 408576698