summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-07-22 14:51:16 +0100
committerBen Murdoch <benm@google.com>2010-07-22 14:51:16 +0100
commit3bec4d28b1f388dbc06a9c4276e1a03e86c52b04 (patch)
tree538bb9cb5e3664733f56ba3292342ccc426eb9f9 /include
parent2794f167cd167a39859e9be5be3b05bdb5feb10a (diff)
downloadandroid_external_v8-3bec4d28b1f388dbc06a9c4276e1a03e86c52b04.tar.gz
android_external_v8-3bec4d28b1f388dbc06a9c4276e1a03e86c52b04.tar.bz2
android_external_v8-3bec4d28b1f388dbc06a9c4276e1a03e86c52b04.zip
Update V8 to r5091 as required by WebKit r63859.
Change-Id: I8e35d765e6f6c7f89eccff900e1cabe2d5dd6110
Diffstat (limited to 'include')
-rw-r--r--include/v8-debug.h16
-rw-r--r--include/v8-profiler.h21
-rw-r--r--include/v8.h16
3 files changed, 51 insertions, 2 deletions
diff --git a/include/v8-debug.h b/include/v8-debug.h
index c53b6346..414fd862 100644
--- a/include/v8-debug.h
+++ b/include/v8-debug.h
@@ -76,7 +76,8 @@ enum DebugEvent {
NewFunction = 3,
BeforeCompile = 4,
AfterCompile = 5,
- ScriptCollected = 6
+ ScriptCollected = 6,
+ BreakForCommand = 7
};
@@ -172,6 +173,13 @@ class EXPORT Debug {
*/
virtual Handle<Value> GetCallbackData() const = 0;
+ /**
+ * Client data passed to DebugBreakForCommand function. The
+ * debugger takes ownership of the data and will delete it even if
+ * there is no message handler.
+ */
+ virtual ClientData* GetClientData() const = 0;
+
virtual ~EventDetails() {}
};
@@ -248,6 +256,12 @@ class EXPORT Debug {
// Break execution of JavaScript.
static void DebugBreak();
+ // Break execution of JavaScript (this method can be invoked from a
+ // non-VM thread) for further client command execution on a VM
+ // thread. Client data is then passed in EventDetails to
+ // EventCallback at the moment when the VM actually stops.
+ static void DebugBreakForCommand(ClientData* data = NULL);
+
// Message based interface. The message protocol is JSON. NOTE the message
// handler thread is not supported any more parameter must be false.
static void SetMessageHandler(MessageHandler handler,
diff --git a/include/v8-profiler.h b/include/v8-profiler.h
index 3e1952c7..c99eb0d9 100644
--- a/include/v8-profiler.h
+++ b/include/v8-profiler.h
@@ -258,6 +258,12 @@ class V8EXPORT HeapGraphNode {
*/
Handle<String> GetName() const;
+ /**
+ * Returns node id. For the same heap object, the id remains the same
+ * across all snapshots.
+ */
+ uint64_t GetId() const;
+
/** Returns node's own size, in bytes. */
int GetSelfSize() const;
@@ -290,6 +296,16 @@ class V8EXPORT HeapGraphNode {
};
+class V8EXPORT HeapSnapshotsDiff {
+ public:
+ /** Returns the root node for added nodes. */
+ const HeapGraphNode* GetAdditionsRoot() const;
+
+ /** Returns the root node for deleted nodes. */
+ const HeapGraphNode* GetDeletionsRoot() const;
+};
+
+
/**
* HeapSnapshots record the state of the JS heap at some moment.
*/
@@ -302,7 +318,10 @@ class V8EXPORT HeapSnapshot {
Handle<String> GetTitle() const;
/** Returns the root node of the heap graph. */
- const HeapGraphNode* GetHead() const;
+ const HeapGraphNode* GetRoot() const;
+
+ /** Returns a diff between this snapshot and another one. */
+ const HeapSnapshotsDiff* CompareWith(const HeapSnapshot* snapshot) const;
};
diff --git a/include/v8.h b/include/v8.h
index ca4a247f..9e4cebb7 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -694,6 +694,13 @@ class V8EXPORT Message {
Handle<Value> GetScriptData() const;
/**
+ * Exception stack trace. By default stack traces are not captured for
+ * uncaught exceptions. SetCaptureStackTraceForUncaughtExceptions allows
+ * to change this option.
+ */
+ Handle<StackTrace> GetStackTrace() const;
+
+ /**
* Returns the number, 1-based, of the line where the error occurred.
*/
int GetLineNumber() const;
@@ -2459,6 +2466,15 @@ class V8EXPORT V8 {
static void RemoveMessageListeners(MessageCallback that);
/**
+ * Tells V8 to capture current stack trace when uncaught exception occurs
+ * and report it to the message listeners. The option is off by default.
+ */
+ static void SetCaptureStackTraceForUncaughtExceptions(
+ bool capture,
+ int frame_limit = 10,
+ StackTrace::StackTraceOptions options = StackTrace::kOverview);
+
+ /**
* Sets V8 flags from a string.
*/
static void SetFlagsFromString(const char* str, int length);