Revision: 19264
Author:   [email protected]
Date:     Tue Feb 11 09:29:51 2014 UTC
Log:      Remove obsolete stack trace string in a message object.

The stack trace string is an ancient relic that is no longer being used.
We use the structured stack trace object instead.

[email protected]

Review URL: https://codereview.chromium.org/159013002
http://code.google.com/p/v8/source/detail?r=19264

Modified:
 /branches/bleeding_edge/src/debug.cc
 /branches/bleeding_edge/src/factory.cc
 /branches/bleeding_edge/src/factory.h
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/heap.h
 /branches/bleeding_edge/src/isolate.cc
 /branches/bleeding_edge/src/messages.cc
 /branches/bleeding_edge/src/messages.h
 /branches/bleeding_edge/src/objects-debug.cc
 /branches/bleeding_edge/src/objects-inl.h
 /branches/bleeding_edge/src/objects-printer.cc
 /branches/bleeding_edge/src/objects.h

=======================================
--- /branches/bleeding_edge/src/debug.cc        Fri Jan 31 16:52:17 2014 UTC
+++ /branches/bleeding_edge/src/debug.cc        Tue Feb 11 09:29:51 2014 UTC
@@ -792,7 +792,7 @@
     isolate->ComputeLocation(&computed_location);
     Handle<Object> message = MessageHandler::MakeMessageObject(
         isolate, "error_loading_debugger", &computed_location,
- Vector<Handle<Object> >::empty(), Handle<String>(), Handle<JSArray>());
+        Vector<Handle<Object> >::empty(), Handle<JSArray>());
     ASSERT(!isolate->has_pending_exception());
     if (!exception.is_null()) {
       isolate->set_pending_exception(*exception);
=======================================
--- /branches/bleeding_edge/src/factory.cc      Wed Jan 29 14:31:34 2014 UTC
+++ /branches/bleeding_edge/src/factory.cc      Tue Feb 11 09:29:51 2014 UTC
@@ -1572,7 +1572,6 @@
     int start_position,
     int end_position,
     Handle<Object> script,
-    Handle<Object> stack_trace,
     Handle<Object> stack_frames) {
   CALL_HEAP_FUNCTION(isolate(),
                      isolate()->heap()->AllocateJSMessageObject(*type,
@@ -1580,7 +1579,6 @@
                          start_position,
                          end_position,
                          *script,
-                         *stack_trace,
                          *stack_frames),
                      JSMessageObject);
 }
=======================================
--- /branches/bleeding_edge/src/factory.h       Wed Jan 29 14:31:34 2014 UTC
+++ /branches/bleeding_edge/src/factory.h       Tue Feb 11 09:29:51 2014 UTC
@@ -528,7 +528,6 @@
       int start_position,
       int end_position,
       Handle<Object> script,
-      Handle<Object> stack_trace,
       Handle<Object> stack_frames);

   Handle<SeededNumberDictionary> DictionaryAtNumberPut(
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Tue Feb 11 07:29:23 2014 UTC +++ /branches/bleeding_edge/src/flag-definitions.h Tue Feb 11 09:29:51 2014 UTC
@@ -591,8 +591,6 @@
             "print stack trace when an illegal exception is thrown")
 DEFINE_bool(abort_on_uncaught_exception, false,
"abort program (dump core) when an uncaught exception is thrown")
-DEFINE_bool(trace_exception, false,
-            "print stack trace when throwing exceptions")
 DEFINE_bool(randomize_hashes, true,
             "randomize hashes to avoid predictable hash collisions "
"(with snapshots this option cannot override the baked-in seed)")
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon Feb 10 21:38:17 2014 UTC
+++ /branches/bleeding_edge/src/heap.cc Tue Feb 11 09:29:51 2014 UTC
@@ -3769,7 +3769,6 @@
                                            int start_position,
                                            int end_position,
                                            Object* script,
-                                           Object* stack_trace,
                                            Object* stack_frames) {
   Object* result;
   { MaybeObject* maybe_result = Allocate(message_object_map(), NEW_SPACE);
@@ -3784,7 +3783,6 @@
   message->set_start_position(start_position);
   message->set_end_position(end_position);
   message->set_script(script);
-  message->set_stack_trace(stack_trace);
   message->set_stack_frames(stack_frames);
   return result;
 }
=======================================
--- /branches/bleeding_edge/src/heap.h  Fri Feb  7 09:54:52 2014 UTC
+++ /branches/bleeding_edge/src/heap.h  Tue Feb 11 09:29:51 2014 UTC
@@ -1134,7 +1134,6 @@
       int start_position,
       int end_position,
       Object* script,
-      Object* stack_trace,
       Object* stack_frames);

   // Allocate a new external string object, which is backed by a string
=======================================
--- /branches/bleeding_edge/src/isolate.cc      Tue Feb 11 07:28:05 2014 UTC
+++ /branches/bleeding_edge/src/isolate.cc      Tue Feb 11 09:29:51 2014 UTC
@@ -1123,8 +1123,6 @@
// while the bootstrapper is active since the infrastructure may not have
     // been properly initialized.
     if (!bootstrapping) {
-      Handle<String> stack_trace;
-      if (FLAG_trace_exception) stack_trace = StackTraceString();
       Handle<JSArray> stack_trace_object;
       if (capture_stack_trace_for_uncaught_exceptions_) {
         if (IsErrorObject(exception_handle)) {
@@ -1164,7 +1162,6 @@
           "uncaught_exception",
           location,
           HandleVector<Object>(&exception_arg, 1),
-          stack_trace,
           stack_trace_object);
       thread_local_top()->pending_message_obj_ = *message_obj;
       if (location != NULL) {
=======================================
--- /branches/bleeding_edge/src/messages.cc     Mon Dec  9 07:41:20 2013 UTC
+++ /branches/bleeding_edge/src/messages.cc     Tue Feb 11 09:29:51 2014 UTC
@@ -61,7 +61,6 @@
     const char* type,
     MessageLocation* loc,
     Vector< Handle<Object> > args,
-    Handle<String> stack_trace,
     Handle<JSArray> stack_frames) {
   Factory* factory = isolate->factory();
   Handle<String> type_handle = factory->InternalizeUtf8String(type);
@@ -81,10 +80,6 @@
     end = loc->end_pos();
     script_handle = GetScriptWrapper(loc->script());
   }
-
-  Handle<Object> stack_trace_handle = stack_trace.is_null()
-      ? Handle<Object>::cast(factory->undefined_value())
-      : Handle<Object>::cast(stack_trace);

   Handle<Object> stack_frames_handle = stack_frames.is_null()
       ? Handle<Object>::cast(factory->undefined_value())
@@ -96,7 +91,6 @@
                                   start,
                                   end,
                                   script_handle,
-                                  stack_trace_handle,
                                   stack_frames_handle);

   return message;
=======================================
--- /branches/bleeding_edge/src/messages.h      Tue Jun  4 10:30:05 2013 UTC
+++ /branches/bleeding_edge/src/messages.h      Tue Feb 11 09:29:51 2014 UTC
@@ -95,7 +95,6 @@
       const char* type,
       MessageLocation* loc,
       Vector< Handle<Object> > args,
-      Handle<String> stack_trace,
       Handle<JSArray> stack_frames);

   // Report a formatted message (needs JS allocation).
=======================================
--- /branches/bleeding_edge/src/objects-debug.cc Mon Feb 10 21:38:17 2014 UTC +++ /branches/bleeding_edge/src/objects-debug.cc Tue Feb 11 09:29:51 2014 UTC
@@ -490,7 +490,6 @@
   VerifyObjectField(kEndPositionOffset);
   VerifyObjectField(kArgumentsOffset);
   VerifyObjectField(kScriptOffset);
-  VerifyObjectField(kStackTraceOffset);
   VerifyObjectField(kStackFramesOffset);
 }

=======================================
--- /branches/bleeding_edge/src/objects-inl.h   Mon Feb 10 21:38:17 2014 UTC
+++ /branches/bleeding_edge/src/objects-inl.h   Tue Feb 11 09:29:51 2014 UTC
@@ -5669,7 +5669,6 @@
 ACCESSORS(JSMessageObject, type, String, kTypeOffset)
 ACCESSORS(JSMessageObject, arguments, JSArray, kArgumentsOffset)
 ACCESSORS(JSMessageObject, script, Object, kScriptOffset)
-ACCESSORS(JSMessageObject, stack_trace, Object, kStackTraceOffset)
 ACCESSORS(JSMessageObject, stack_frames, Object, kStackFramesOffset)
 SMI_ACCESSORS(JSMessageObject, start_position, kStartPositionOffset)
 SMI_ACCESSORS(JSMessageObject, end_position, kEndPositionOffset)
=======================================
--- /branches/bleeding_edge/src/objects-printer.cc Mon Feb 10 21:38:17 2014 UTC +++ /branches/bleeding_edge/src/objects-printer.cc Tue Feb 11 09:29:51 2014 UTC
@@ -624,8 +624,6 @@
   PrintF(out, "\n - end_position: %d", end_position());
   PrintF(out, "\n - script: ");
   script()->ShortPrint(out);
-  PrintF(out, "\n - stack_trace: ");
-  stack_trace()->ShortPrint(out);
   PrintF(out, "\n - stack_frames: ");
   stack_frames()->ShortPrint(out);
   PrintF(out, "\n");
=======================================
--- /branches/bleeding_edge/src/objects.h       Tue Feb 11 09:27:01 2014 UTC
+++ /branches/bleeding_edge/src/objects.h       Tue Feb 11 09:29:51 2014 UTC
@@ -7759,9 +7759,6 @@
   // [script]: the script from which the error message originated.
   DECL_ACCESSORS(script, Object)

-  // [stack_trace]: the stack trace for this error message.
-  DECL_ACCESSORS(stack_trace, Object)
-
   // [stack_frames]: an array of stack frames for this error object.
   DECL_ACCESSORS(stack_frames, Object)

@@ -7784,8 +7781,7 @@
   static const int kTypeOffset = JSObject::kHeaderSize;
   static const int kArgumentsOffset = kTypeOffset + kPointerSize;
   static const int kScriptOffset = kArgumentsOffset + kPointerSize;
-  static const int kStackTraceOffset = kScriptOffset + kPointerSize;
-  static const int kStackFramesOffset = kStackTraceOffset + kPointerSize;
+  static const int kStackFramesOffset = kScriptOffset + kPointerSize;
static const int kStartPositionOffset = kStackFramesOffset + kPointerSize; static const int kEndPositionOffset = kStartPositionOffset + kPointerSize;
   static const int kSize = kEndPositionOffset + kPointerSize;

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to