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; |
}; |