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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp

Issue 2016123002: Remove ScriptCallStack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2006893004
Patch Set: rebased Created 4 years, 7 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: third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
index 61a07532ac6d7c05dc771dc91fbf7935263039d5..49277e106cc8f957af314c36a63fa640e22b54d2 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
@@ -720,23 +720,13 @@ PassOwnPtr<TracedValue> InspectorFunctionCallEvent::data(ExecutionContext* conte
return value;
v8::Local<v8::Function> originalFunction = getBoundFunction(function);
- v8::ScriptOrigin origin = originalFunction->GetScriptOrigin();
- int scriptId = originalFunction->ScriptId();
- int lineNumber = 0;
- String scriptName;
- if (!origin.ResourceName().IsEmpty()) {
- V8StringResource<> stringResource(origin.ResourceName());
- stringResource.prepare();
- scriptName = stringResource;
- if (!scriptName.isEmpty())
- lineNumber = originalFunction->GetScriptLineNumber() + 1;
- }
v8::Local<v8::Value> functionName = originalFunction->GetDebugName();
if (!functionName.IsEmpty() && functionName->IsString())
value->setString("functionName", toCoreString(functionName.As<v8::String>()));
- value->setString("scriptId", String::number(scriptId));
- value->setString("scriptName", scriptName);
- value->setInteger("scriptLine", lineNumber);
+ OwnPtr<SourceLocation> location = SourceLocation::fromFunction(originalFunction);
+ value->setString("scriptId", String::number(location->scriptId()));
+ value->setString("scriptName", location->url());
+ value->setInteger("scriptLine", location->lineNumber());
return value;
}

Powered by Google App Engine
This is Rietveld 408576698