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

Unified Diff: include/v8.h

Issue 23536007: Add scriptId to StackTrace frames. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 4 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') | test/cctest/test-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 9ba928bd88fd3913ddb3cb61b2cf2f5f67d0e03e..e0e2547be3ad0d7af121232179a34910a009845a 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1157,6 +1157,7 @@ class V8_EXPORT Message {
static const int kNoLineNumberInfo = 0;
static const int kNoColumnInfo = 0;
+ static const int kNoScriptIdInfo = 0;
};
@@ -1179,6 +1180,7 @@ class V8_EXPORT StackTrace {
kIsEval = 1 << 4,
kIsConstructor = 1 << 5,
kScriptNameOrSourceURL = 1 << 6,
+ kScriptId = 1 << 7,
kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName,
kDetailed = kOverview | kIsEval | kIsConstructor | kScriptNameOrSourceURL
};
@@ -1234,6 +1236,14 @@ class V8_EXPORT StackFrame {
int GetColumn() const;
/**
+ * Returns the id of the script for the function for this StackFrame.
+ * This method will return Message::kNoScriptIdInfo if it is unable to
+ * retrieve the script id, or if kScriptId was not passed as an option when
+ * capturing the StackTrace.
+ */
+ int GetScriptId() const;
+
+ /**
* Returns the name of the resource that contains the script for the
* function for this StackFrame.
*/
« no previous file with comments | « no previous file | src/api.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698