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

Unified Diff: src/isolate.h

Issue 9310063: When rethrowing an exception, print the stack trace of its original site instead of rethrow site. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 7e6807b0a9d3a28538a21a57839419fbb286d7db..a9d90968f1386663a358a87c18f09de2beea12e1 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -235,6 +235,8 @@ class ThreadLocalTop BASE_EMBEDDED {
Context* context_;
ThreadId thread_id_;
MaybeObject* pending_exception_;
+ Object* last_traced_exception_;
+ JSArray* last_stack_trace_;
bool has_pending_message_;
Object* pending_message_obj_;
Script* pending_message_script_;
@@ -564,6 +566,10 @@ class Isolate {
void clear_pending_exception() {
thread_local_top_.pending_exception_ = heap_.the_hole_value();
}
+ void clear_last_stack_trace() {
+ thread_local_top_.last_traced_exception_ = heap_.the_hole_value();
+ thread_local_top_.last_stack_trace_ = NULL;
+ }
MaybeObject** pending_exception_address() {
return &thread_local_top_.pending_exception_;
}
@@ -700,8 +706,7 @@ class Isolate {
void PrintStack();
Handle<String> StackTraceString();
Handle<JSArray> CaptureCurrentStackTrace(
- int frame_limit,
- StackTrace::StackTraceOptions options);
+ int frame_limit, StackTrace::StackTraceOptions options);
// Returns if the top context may access the given global object. If
// the result is false, the pending exception is guaranteed to be
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698