Reviewers: Michail Naganov, Mads Ager,

Description:
Accept all possible combinations of StackTraceOptions, not only members of the
enum


Please review this at http://codereview.chromium.org/3611008/show

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     include/v8.h
  M     src/api.cc
  M     src/top.h
  M     src/top.cc


Index: include/v8.h
===================================================================
--- include/v8.h        (revision 5589)
+++ include/v8.h        (working copy)
@@ -787,7 +787,7 @@
    */
   static Local<StackTrace> CurrentStackTrace(
       int frame_limit,
-      StackTraceOptions options = kOverview);
+      int options = kOverview);
 };


@@ -2558,7 +2558,7 @@
   static void SetCaptureStackTraceForUncaughtExceptions(
       bool capture,
       int frame_limit = 10,
-      StackTrace::StackTraceOptions options = StackTrace::kOverview);
+      int options = StackTrace::kOverview);

   /**
    * Sets V8 flags from a string.
Index: src/api.cc
===================================================================
--- src/api.cc  (revision 5589)
+++ src/api.cc  (working copy)
@@ -1624,8 +1624,7 @@
 }


-Local<StackTrace> StackTrace::CurrentStackTrace(int frame_limit,
-    StackTraceOptions options) {
+Local<StackTrace> StackTrace::CurrentStackTrace(int frame_limit, int options) { if (IsDeadCheck("v8::StackTrace::CurrentStackTrace()")) Local<StackTrace>();
   ENTER_V8;
   i::Handle<i::JSArray> stackTrace =
@@ -3916,7 +3915,7 @@
 void V8::SetCaptureStackTraceForUncaughtExceptions(
       bool capture,
       int frame_limit,
-      StackTrace::StackTraceOptions options) {
+      int options) {
   i::Top::SetCaptureStackTraceForUncaughtExceptions(
       capture,
       frame_limit,
Index: src/top.cc
===================================================================
--- src/top.cc  (revision 5592)
+++ src/top.cc  (working copy)
@@ -46,8 +46,7 @@

 bool capture_stack_trace_for_uncaught_exceptions = false;
 int stack_trace_for_uncaught_exceptions_frame_limit = 0;
-StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options =
-    StackTrace::kOverview;
+int stack_trace_for_uncaught_exceptions_options = StackTrace::kOverview;

 Address top_addresses[] = {
 #define C(name) reinterpret_cast<Address>(Top::name()),
@@ -336,7 +335,7 @@


 Handle<JSArray> Top::CaptureCurrentStackTrace(
-    int frame_limit, StackTrace::StackTraceOptions options) {
+    int frame_limit, int options) {
   // Ensure no negative values.
   int limit = Max(frame_limit, 0);
   Handle<JSArray> stack_trace = Factory::NewJSArray(frame_limit);
@@ -971,7 +970,7 @@
 void Top::SetCaptureStackTraceForUncaughtExceptions(
       bool capture,
       int frame_limit,
-      StackTrace::StackTraceOptions options) {
+      int options) {
   capture_stack_trace_for_uncaught_exceptions = capture;
   stack_trace_for_uncaught_exceptions_frame_limit = frame_limit;
   stack_trace_for_uncaught_exceptions_options = options;
Index: src/top.h
===================================================================
--- src/top.h   (revision 5589)
+++ src/top.h   (working copy)
@@ -227,7 +227,7 @@
   static void SetCaptureStackTraceForUncaughtExceptions(
       bool capture,
       int frame_limit,
-      StackTrace::StackTraceOptions options);
+      int options);

   // Tells whether the current context has experienced an out of memory
   // exception.
@@ -264,7 +264,7 @@
   static Handle<String> StackTraceString();
   static Handle<JSArray> CaptureCurrentStackTrace(
       int frame_limit,
-      StackTrace::StackTraceOptions options);
+      int options);

   // Returns if the top context may access the given global object. If
   // the result is false, the pending exception is guaranteed to be


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to