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

Unified Diff: Source/bindings/core/v8/V8ScriptRunner.cpp

Issue 1307363006: DevTools: move instrumentation of v8 calls into V8ScriptRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed comments 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/core/v8/V8ScriptRunner.cpp
diff --git a/Source/bindings/core/v8/V8ScriptRunner.cpp b/Source/bindings/core/v8/V8ScriptRunner.cpp
index 631d6125bdb82b5e4a87191c316a63652224a934..56a43d49fab8a493b14373ed9810787be2315464 100644
--- a/Source/bindings/core/v8/V8ScriptRunner.cpp
+++ b/Source/bindings/core/v8/V8ScriptRunner.cpp
@@ -35,6 +35,7 @@
#include "core/dom/ExecutionContext.h"
#include "core/fetch/CachedMetadata.h"
#include "core/fetch/ScriptResource.h"
+#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InspectorTraceEvents.h"
#include "platform/ScriptForbiddenScope.h"
#include "platform/TraceEvent.h"
@@ -388,7 +389,9 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::runCompiledScript(v8::Isolate* isolate
return v8::MaybeLocal<v8::Value>();
}
V8RecursionScope recursionScope(isolate);
+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willExecuteScript(context, script->GetUnboundScript()->GetId());
result = script->Run(isolate->GetCurrentContext());
+ InspectorInstrumentation::didExecuteScript(cookie);
}
crashIfV8IsDead();
@@ -434,8 +437,10 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callFunction(v8::Local<v8::Function> f
return v8::MaybeLocal<v8::Value>();
}
V8RecursionScope recursionScope(isolate);
+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willExecuteScript(context, function->ScriptId());
v8::MaybeLocal<v8::Value> result = function->Call(isolate->GetCurrentContext(), receiver, argc, args);
crashIfV8IsDead();
+ InspectorInstrumentation::didExecuteScript(cookie);
return result;
}
« no previous file with comments | « Source/bindings/core/v8/ScriptController.cpp ('k') | Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698