Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| index f7258b0a58a5c024c2a58b189e65bfc0ef3c2686..0eb13540d0db70289f1854b17ed806dba1a13a99 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| @@ -35,6 +35,7 @@ |
| #include "core/fetch/CachedMetadata.h" |
| #include "core/fetch/ScriptResource.h" |
| #include "core/frame/LocalFrame.h" |
| +#include "core/inspector/InspectorInstrumentation.h" |
| #include "core/inspector/InspectorTraceEvents.h" |
| #include "core/inspector/ThreadDebugger.h" |
| #include "platform/Histogram.h" |
| @@ -403,6 +404,9 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::runCompiledScript(v8::Isolate* isolate |
| RELEASE_ASSERT(!context->isIteratingOverObservers()); |
| + InspectorInstrumentation::willExecuteScript( |
|
pfeldman
2016/08/15 17:59:55
Here and below: you can pass |context| here, it'll
panicker
2016/08/15 20:48:55
Done.
|
| + context->isDocument() ? toDocument(context)->frame() : nullptr); |
| + |
| // Run the script and keep track of the current recursion depth. |
| v8::MaybeLocal<v8::Value> result; |
| { |
| @@ -416,6 +420,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::runCompiledScript(v8::Isolate* isolate |
| ThreadDebugger::didExecuteScript(isolate); |
| } |
| + InspectorInstrumentation::didExecuteScript( |
| + context->isDocument() ? toDocument(context)->frame() : nullptr); |
| crashIfIsolateIsDead(isolate); |
| return result; |
| } |
| @@ -502,6 +508,9 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callFunction(v8::Local<v8::Function> f |
| } |
| if (!depth) |
| TRACE_EVENT_BEGIN1("devtools.timeline", "FunctionCall", "data", InspectorFunctionCallEvent::data(context, function)); |
| + InspectorInstrumentation::willExecuteScript( |
| + context->isDocument() ? toDocument(context)->frame() : nullptr); |
| + |
| v8::MaybeLocal<v8::Value> result; |
| { |
| // Create an extra block so FunctionCall trace event end phase is recorded after |
| @@ -512,6 +521,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callFunction(v8::Local<v8::Function> f |
| crashIfIsolateIsDead(isolate); |
| ThreadDebugger::didExecuteScript(isolate); |
| } |
| + InspectorInstrumentation::didExecuteScript( |
| + context->isDocument() ? toDocument(context)->frame() : nullptr); |
| if (!depth) |
| TRACE_EVENT_END0("devtools.timeline", "FunctionCall"); |
| return result; |