| Index: Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp
|
| diff --git a/Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp b/Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp
|
| index 6e3f4f0b461b8db3ad99b8ee0e4aae1dd813e9bc..daffe5e823f86c5cc0c10d283dca367e27ed8667 100644
|
| --- a/Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp
|
| +++ b/Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp
|
| @@ -79,28 +79,6 @@ void V8WorkerGlobalScopeEventListener::handleEvent(ExecutionContext* context, Ev
|
| invokeEventHandler(context, event, v8::Local<v8::Value>::New(isolate, jsEvent));
|
| }
|
|
|
| -static void devtoolsFunctionInfo(v8::Handle<v8::Function> handlerFunction, v8::Isolate* isolate, int& scriptId, String& resourceName, int& lineNumber)
|
| -{
|
| - lineNumber = 1;
|
| - v8::Handle<v8::Function> originalFunction = getBoundFunction(handlerFunction);
|
| - v8::ScriptOrigin origin = originalFunction->GetScriptOrigin();
|
| - if (!origin.ResourceName().IsEmpty()) {
|
| - resourceName = NativeValueTraits<String>::nativeValue(origin.ResourceName(), isolate);
|
| - lineNumber = originalFunction->GetScriptLineNumber() + 1;
|
| - }
|
| - if (resourceName.isEmpty())
|
| - resourceName = "undefined";
|
| -}
|
| -
|
| -static PassRefPtr<TraceEvent::ConvertableToTraceFormat> devtoolsTraceEventData(ExecutionContext* context, v8::Handle<v8::Function> handlerFunction, v8::Isolate* isolate)
|
| -{
|
| - int scriptId = 0;
|
| - String resourceName;
|
| - int lineNumber = 1;
|
| - devtoolsFunctionInfo(handlerFunction, isolate, scriptId, resourceName, lineNumber);
|
| - return InspectorFunctionCallEvent::data(context, scriptId, resourceName, lineNumber);
|
| -}
|
| -
|
| v8::Local<v8::Value> V8WorkerGlobalScopeEventListener::callListenerFunction(ExecutionContext* context, v8::Handle<v8::Value> jsEvent, Event* event)
|
| {
|
| v8::Local<v8::Function> handlerFunction = getListenerFunction(context);
|
| @@ -109,14 +87,15 @@ v8::Local<v8::Value> V8WorkerGlobalScopeEventListener::callListenerFunction(Exec
|
| return v8::Local<v8::Value>();
|
|
|
| v8::Isolate* isolate = toIsolate(context);
|
| - TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "FunctionCall", "data", devtoolsTraceEventData(context, handlerFunction, isolate));
|
| + TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "FunctionCall", "data", devToolsTraceEventData(context, handlerFunction, isolate));
|
| + TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "CallStack", "stack", InspectorCallStackEvent::currentCallStack());
|
| // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeline migrates to tracing.
|
| InspectorInstrumentationCookie cookie;
|
| if (InspectorInstrumentation::timelineAgentEnabled(context)) {
|
| int scriptId = 0;
|
| String resourceName;
|
| int lineNumber = 1;
|
| - devtoolsFunctionInfo(handlerFunction, isolate, scriptId, resourceName, lineNumber);
|
| + GetDevToolsFunctionInfo(handlerFunction, isolate, scriptId, resourceName, lineNumber);
|
| cookie = InspectorInstrumentation::willCallFunction(context, scriptId, resourceName, lineNumber);
|
| }
|
|
|
|
|