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

Issue 2531163010: [inspector] Introduce debug::WasmScript (Closed)

Created:
4 years ago by Clemens Hammacher
Modified:
4 years ago
Reviewers:
kozy, titzer, dgozman, Yang
CC:
devtools-reviews_chromium.org, kozy, v8-reviews_googlegroups.com, Yang
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[inspector] Introduce debug::WasmScript *and* report all "virtual" wasm scripts right when the wasm script is registered at the inspector. WasmScript is a subtype of Script, with the cast checking that it is actually a wasm script. This layout makes it quite easy to implement functionality that is only available for wasm scripts, and allows to later directly use the WasmCompiledModule instead of the i::Script for backing the debug::WasmScript. We might also add virtual methods to provide different implementations for GetSourcePosition, Source and others. DisassembleWasmFunction now also becomes a method of this class instead of a static function on the DebugInterface. The WasmTranslation now uses the new WasmScript type instead of the Script wrapper, and also registers all virtual wasm scripts immediately when the wasm script is made public to the inspector (when the wasm module is created). R=yangguo@chromium.org,dgozman@chromium.org,titzer@chromium.org BUG=chromium:613110, chromium:659715 Committed: https://crrev.com/12cdb31b2fd1a51843e0b4753af15e4488a67a3e Cr-Commit-Position: refs/heads/master@{#41519}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments #

Total comments: 2

Patch Set 3 : Fix typo #

Patch Set 4 : Rebase #

Total comments: 2

Patch Set 5 : Rebase #

Patch Set 6 : Fix expected output #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -139 lines) Patch
M src/api.cc View 1 2 3 4 2 chunks +34 lines, -17 lines 0 comments Download
M src/debug/debug-interface.h View 1 2 3 4 1 chunk +11 lines, -7 lines 0 comments Download
M src/inspector/v8-debugger.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/inspector/v8-debugger-agent-impl.cc View 1 2 3 4 5 chunks +8 lines, -11 lines 0 comments Download
M src/inspector/v8-stack-trace-impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/inspector/wasm-translation.h View 1 2 3 4 3 chunks +11 lines, -21 lines 0 comments Download
M src/inspector/wasm-translation.cc View 1 2 3 4 11 chunks +74 lines, -80 lines 0 comments Download
A test/inspector/debugger/wasm-scripts.js View 1 2 3 4 1 chunk +71 lines, -0 lines 0 comments Download
A test/inspector/debugger/wasm-scripts-expected.txt View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
M test/inspector/protocol-test.js View 1 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 44 (33 generated)
Clemens Hammacher
4 years ago (2016-12-01 17:30:06 UTC) #8
dgozman
lgtm https://codereview.chromium.org/2531163010/diff/1/src/inspector/v8-debugger-agent-impl.cc File src/inspector/v8-debugger-agent-impl.cc (right): https://codereview.chromium.org/2531163010/diff/1/src/inspector/v8-debugger-agent-impl.cc#newcode528 src/inspector/v8-debugger-agent-impl.cc:528: if (m_scripts.count(breakpoint.script_id) == 0) { Do we need ...
4 years ago (2016-12-02 00:52:01 UTC) #9
Clemens Hammacher
https://codereview.chromium.org/2531163010/diff/1/src/inspector/v8-debugger-agent-impl.cc File src/inspector/v8-debugger-agent-impl.cc (right): https://codereview.chromium.org/2531163010/diff/1/src/inspector/v8-debugger-agent-impl.cc#newcode528 src/inspector/v8-debugger-agent-impl.cc:528: if (m_scripts.count(breakpoint.script_id) == 0) { On 2016/12/02 at 00:52:01, ...
4 years ago (2016-12-02 09:23:47 UTC) #12
titzer
lgtm but deferring to Yang. https://codereview.chromium.org/2531163010/diff/20001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/2531163010/diff/20001/src/api.cc#newcode9110 src/api.cc:9110: int DebugInterface::WasmScript::NumFunction() const { ...
4 years ago (2016-12-02 09:52:36 UTC) #15
Clemens Hammacher
https://codereview.chromium.org/2531163010/diff/20001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/2531163010/diff/20001/src/api.cc#newcode9110 src/api.cc:9110: int DebugInterface::WasmScript::NumFunction() const { On 2016/12/02 at 09:52:36, titzer ...
4 years ago (2016-12-02 10:38:10 UTC) #18
kozy
lgtm https://codereview.chromium.org/2531163010/diff/60001/test/inspector/debugger/wasm-scripts.js File test/inspector/debugger/wasm-scripts.js (right): https://codereview.chromium.org/2531163010/diff/60001/test/inspector/debugger/wasm-scripts.js#newcode51 test/inspector/debugger/wasm-scripts.js:51: InspectorTest.log("Script #" + num_scripts + " parsed. URL: ...
4 years ago (2016-12-02 18:13:50 UTC) #26
Yang
lgtm.
4 years ago (2016-12-05 18:59:04 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2531163010/100001
4 years ago (2016-12-06 13:18:18 UTC) #39
Clemens Hammacher
https://codereview.chromium.org/2531163010/diff/60001/test/inspector/debugger/wasm-scripts.js File test/inspector/debugger/wasm-scripts.js (right): https://codereview.chromium.org/2531163010/diff/60001/test/inspector/debugger/wasm-scripts.js#newcode51 test/inspector/debugger/wasm-scripts.js:51: InspectorTest.log("Script #" + num_scripts + " parsed. URL: " ...
4 years ago (2016-12-06 13:18:20 UTC) #40
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-06 13:20:16 UTC) #42
commit-bot: I haz the power
4 years ago (2016-12-06 13:20:45 UTC) #44
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/12cdb31b2fd1a51843e0b4753af15e4488a67a3e
Cr-Commit-Position: refs/heads/master@{#41519}

Powered by Google App Engine
This is Rietveld 408576698