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

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: rebase 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 83b777d30948104bec43ba3c9926cd68ff637690..cc92a63943d43fdf8d8ab8677ab760ceebda1eb6 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;
+
+ /**
Yang 2016/04/28 13:08:43 Why do we need these three methods? What changes a
+ * 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
Yang 2016/04/28 13:08:43 Can we just crash with a check failure if the func
+ * 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