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

Unified Diff: src/debug/debug-interface.h

Issue 2531163010: [inspector] Introduce debug::WasmScript (Closed)
Patch Set: Address comments Created 4 years 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
« src/api.cc ('K') | « src/api.cc ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-interface.h
diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h
index 11172eb03dddfd3d39d2bf467084d0bfaf61a934..3595cd6b95d3e273ef97e6cc61d242c9f3218413 100644
--- a/src/debug/debug-interface.h
+++ b/src/debug/debug-interface.h
@@ -198,18 +198,27 @@ class DebugInterface {
int GetSourcePosition(const Location& location) const;
};
+ // Specialization for wasm Scripts.
+ class WasmScript : public Script {
+ public:
+ static WasmScript* Cast(Script* script);
+
+ int NumFunction() const;
+ int NumImportedFunction() const;
+
+ /**
+ * Compute the disassembly of a wasm function.
+ * Returns the disassembly string and a list of <byte_offset, line, column>
+ * entries, mapping wasm byte offsets to line and column in the disassembly.
+ * The list is guaranteed to be ordered by the byte_offset.
+ */
+ std::pair<std::string, std::vector<std::tuple<uint32_t, int, int>>>
+ DisassembleFunction(int function_index);
+ };
+
static void GetLoadedScripts(Isolate* isolate,
PersistentValueVector<Script>& scripts);
- /**
- * Compute the disassembly of a wasm function.
- * Returns the disassembly string and a list of <byte_offset, line, column>
- * entries, mapping wasm byte offsets to line and column in the disassembly.
- * The list is guaranteed to be ordered by the byte_offset.
- */
- static std::pair<std::string, std::vector<std::tuple<uint32_t, int, int>>>
- DisassembleWasmFunction(Isolate* isolate, v8::Local<v8::Object> script,
- int function_index);
static MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate,
Local<String> source);
};
« src/api.cc ('K') | « src/api.cc ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698