summaryrefslogtreecommitdiff
path: root/deps/v8/src/inspector/v8-debugger-script.h
diff options
context:
space:
mode:
authorAlexey Kozyatinskiy <kozyatinskiy@chromium.org>2018-08-10 13:09:49 -0700
committerAlexey Kozyatinskiy <kozyatinskiy@chromium.org>2018-09-14 08:31:44 -0700
commitab150160f8149063865729e52c6a7597133f9057 (patch)
tree7dcaebfcb923c8206101c0559d3284dea5fa580a /deps/v8/src/inspector/v8-debugger-script.h
parent90c93682d13ed4edf150d9c8c61ad9a0eb2c0b26 (diff)
downloadandroid-node-v8-ab150160f8149063865729e52c6a7597133f9057.tar.gz
android-node-v8-ab150160f8149063865729e52c6a7597133f9057.tar.bz2
android-node-v8-ab150160f8149063865729e52c6a7597133f9057.zip
deps: cherry-pick dbfcc48 from upstream V8
Original commit message: ``` [inspector] added V8InspectorClient::resourceNameToUrl Some clients (see Node.js) use platform path as ScriptOrigin. Reporting platform path in protocol makes using protocol much harder. This CL introduced V8InspectorClient::resourceNameToUrl method that is called for any reported using protocol url. V8Inspector uses url internally as well so protocol client may generate pattern for blackboxing with file urls only and does not need to build complicated regexp that covers files urls and platform paths on different platforms. R=lushnikov@chromium.org TBR=yangguo@chromium.org Bug: none Change-Id: Iff302e7441df922fa5d689fe510f5a9bfd470b9b Reviewed-on: https://chromium-review.googlesource.com/1164624 Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Alexei Filippov <alph@chromium.org> Cr-Commit-Position: refs/heads/master@{#55029} ``` Refs: https://github.com/v8/v8/commit/dbfcc48 PR-URL: https://github.com/nodejs/node/pull/22251 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Diffstat (limited to 'deps/v8/src/inspector/v8-debugger-script.h')
-rw-r--r--deps/v8/src/inspector/v8-debugger-script.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/deps/v8/src/inspector/v8-debugger-script.h b/deps/v8/src/inspector/v8-debugger-script.h
index e0e7d93b20..38e6448f48 100644
--- a/deps/v8/src/inspector/v8-debugger-script.h
+++ b/deps/v8/src/inspector/v8-debugger-script.h
@@ -40,13 +40,14 @@
namespace v8_inspector {
// Forward declaration.
+class V8InspectorClient;
class WasmTranslation;
class V8DebuggerScript {
public:
static std::unique_ptr<V8DebuggerScript> Create(
v8::Isolate* isolate, v8::Local<v8::debug::Script> script,
- bool isLiveEdit);
+ bool isLiveEdit, V8InspectorClient* client);
static std::unique_ptr<V8DebuggerScript> CreateWasm(
v8::Isolate* isolate, WasmTranslation* wasmTranslation,
v8::Local<v8::debug::WasmScript> underlyingScript, String16 id,
@@ -55,9 +56,9 @@ class V8DebuggerScript {
virtual ~V8DebuggerScript();
const String16& scriptId() const { return m_id; }
- const String16& url() const { return m_url; }
- bool hasSourceURL() const { return !m_sourceURL.isEmpty(); }
- const String16& sourceURL() const;
+ bool hasSourceURLComment() const { return m_hasSourceURLComment; }
+ const String16& sourceURL() const { return m_url; }
+
virtual const String16& sourceMappingURL() const = 0;
virtual const String16& source() const = 0;
virtual const String16& hash() const = 0;
@@ -95,7 +96,7 @@ class V8DebuggerScript {
String16 m_id;
String16 m_url;
- String16 m_sourceURL;
+ bool m_hasSourceURLComment = false;
int m_executionContextId = 0;
v8::Isolate* m_isolate;