Push version 2.2.24 to trunk.
Added API for capturing stack traces for uncaught exceptions.
Fixed crash bug when preparsing from a non-external V8 string (issue 775).
Fixed JSON.parse bug causing input not to be converted to string (issue 764).
Added ES5 Object.freeze and Object.isFrozen.
Performance improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@5060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/include/v8.h b/include/v8.h
index ca4a247..9e4cebb 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -694,6 +694,13 @@
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 @@
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);