Commit 21f72f82 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by V8 LUCI CQ

[inspector] Send empty string for `Debugger.CallFrame.url`.

This is the final step towards moving away from sending `url` with
every call frame when emitting the `Debugger.paused` event.

Fixed: chromium:1270316
Bug: chromium:1271078
Change-Id: I87a286d81eb91a9bed64213c4b18db0675858822
Doc: https://bit.ly/devtools-debugger-callframe-url
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3345001
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78974}
parent 08b3da7f
......@@ -1466,20 +1466,13 @@ Response V8DebuggerAgentImpl::currentCallFrames(
.setLineNumber(loc.GetLineNumber())
.setColumnNumber(loc.GetColumnNumber())
.build();
String16 scriptId = String16::fromInteger(script->Id());
ScriptsMap::iterator scriptIterator =
m_scripts.find(location->getScriptId());
String16 url;
if (scriptIterator != m_scripts.end()) {
url = scriptIterator->second->sourceURL();
}
auto frame = CallFrame::create()
.setCallFrameId(callFrameId)
.setFunctionName(toProtocolString(
m_isolate, iterator->GetFunctionDebugName()))
.setLocation(std::move(location))
.setUrl(url)
.setUrl(String16())
.setScopeChain(std::move(scopes))
.setThis(std::move(protocolReceiver))
.build();
......
......@@ -4,12 +4,12 @@ Tests url in Debugger.CallFrame.
url :
}
[1] : {
url : source-url.js
url :
}
[2] : {
url : test.js
url :
}
[3] : {
url : expr.js
url :
}
]
......@@ -124,7 +124,7 @@ Test runtime stack trace:
}
Test debugger stack trace:
[
[0] : prefix://url
[1] : boo.js
[2] : prefix://url
[0] :
[1] :
[2] :
]
......@@ -123,7 +123,7 @@ console.log(239)
this : {
type : undefined
}
url : module3
url :
}
]
hitBreakpoints : [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment