diff options
author | Benjamin Coe <bencoe@google.com> | 2019-09-20 11:43:02 -0700 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-09-22 00:39:41 +0200 |
commit | 8f06773a8cd73aef37ddc8f68d2c8202f1a8c45a (patch) | |
tree | 9fc55258099209d89e0eebdd2b6a45128da0f928 /src/inspector_profiler.h | |
parent | e74f30894c46c94aa1329e8462f811b8d5e54a91 (diff) | |
download | android-node-v8-8f06773a8cd73aef37ddc8f68d2c8202f1a8c45a.tar.gz android-node-v8-8f06773a8cd73aef37ddc8f68d2c8202f1a8c45a.tar.bz2 android-node-v8-8f06773a8cd73aef37ddc8f68d2c8202f1a8c45a.zip |
process: initial SourceMap support via NODE_V8_COVERAGE
PR-URL: https://github.com/nodejs/node/pull/28960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src/inspector_profiler.h')
-rw-r--r-- | src/inspector_profiler.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/inspector_profiler.h b/src/inspector_profiler.h index e7d45d7de3..4a21eb3a2d 100644 --- a/src/inspector_profiler.h +++ b/src/inspector_profiler.h @@ -59,13 +59,15 @@ class V8ProfilerConnection { // which will be then written as a JSON. virtual v8::MaybeLocal<v8::Object> GetProfile( v8::Local<v8::Object> result) = 0; + virtual void WriteProfile(v8::Local<v8::String> message); private: size_t next_id() { return id_++; } - void WriteProfile(v8::Local<v8::String> message); std::unique_ptr<inspector::InspectorSession> session_; - Environment* env_ = nullptr; size_t id_ = 1; + + protected: + Environment* env_ = nullptr; }; class V8CoverageConnection : public V8ProfilerConnection { @@ -81,6 +83,8 @@ class V8CoverageConnection : public V8ProfilerConnection { std::string GetDirectory() const override; std::string GetFilename() const override; v8::MaybeLocal<v8::Object> GetProfile(v8::Local<v8::Object> result) override; + void WriteProfile(v8::Local<v8::String> message) override; + void WriteSourceMapCache(); private: std::unique_ptr<inspector::InspectorSession> session_; |