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

Unified Diff: include/v8.h

Issue 1909353002: [wasm] Make wasm info available on the stack trace (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-3
Patch Set: more gcmole problems Created 4 years, 8 months 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 51fb1330614237fe6a1e735d9ff5d44798fd552e..25bfbf38064d12ce9646a11b5fc4d211ebac2838 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1528,6 +1528,7 @@ class V8_EXPORT Message {
static const int kNoLineNumberInfo = 0;
static const int kNoColumnInfo = 0;
static const int kNoScriptIdInfo = 0;
+ static const uint32_t kNoWasmByteOffsetInfo = static_cast<uint32_t>(-1);
};
@@ -1552,7 +1553,11 @@ class V8_EXPORT StackTrace {
kScriptNameOrSourceURL = 1 << 6,
kScriptId = 1 << 7,
kExposeFramesAcrossSecurityOrigins = 1 << 8,
- kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName,
+ kIsWasm = 1 << 9,
+ kWasmByteOffset = 1 << 10,
+ kWasmObject = 1 << 11,
+ kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName |
+ kIsWasm | kWasmByteOffset | kWasmObject,
kDetailed = kOverview | kIsEval | kIsConstructor | kScriptNameOrSourceURL
};
@@ -1645,6 +1650,27 @@ class V8_EXPORT StackFrame {
* constructor via "new".
*/
bool IsConstructor() const;
+
+ /**
+ * Returns whether or not the associated function is a wasm function.
+ * Always returns false if kIsWasm was not passed as an option when capturing
+ * the StackTrace.
+ */
+ bool IsWasm() const;
+
+ /**
+ * Returns the wasm object, or undefined if the associated function of the
+ * frame is no wasm function or if kWasmObject was not passed as an option
+ * when capturing the StackTrace.
+ */
+ Local<Object> GetWasmObject() const;
+
+ /**
+ * Returns the byte offset in the associated wasm function, or
+ * Message::kNoWasmByteOffsetInfo if the associated function of the frame is
+ * no wasm function.
+ */
+ uint32_t GetWasmByteOffset() const;
};
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698