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

Side by Side Diff: src/isolate.h

Issue 687253002: Introduce v8::Exception::GetMessage to find location of an error object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: relanding Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ISOLATE_H_ 5 #ifndef V8_ISOLATE_H_
6 #define V8_ISOLATE_H_ 6 #define V8_ISOLATE_H_
7 7
8 #include "include/v8-debug.h" 8 #include "include/v8-debug.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 Object* PromoteScheduledException(); 794 Object* PromoteScheduledException();
795 void DoThrow(Object* exception, MessageLocation* location); 795 void DoThrow(Object* exception, MessageLocation* location);
796 // Checks if exception should be reported and finds out if it's 796 // Checks if exception should be reported and finds out if it's
797 // caught externally. 797 // caught externally.
798 bool ShouldReportException(bool* can_be_caught_externally, 798 bool ShouldReportException(bool* can_be_caught_externally,
799 bool catchable_by_javascript); 799 bool catchable_by_javascript);
800 800
801 // Attempts to compute the current source location, storing the 801 // Attempts to compute the current source location, storing the
802 // result in the target out parameter. 802 // result in the target out parameter.
803 void ComputeLocation(MessageLocation* target); 803 void ComputeLocation(MessageLocation* target);
804 void ComputeLocationFromStackTrace(MessageLocation* target,
805 Handle<Object> exception);
806
807 Handle<JSMessageObject> CreateMessage(Handle<Object> exception,
808 MessageLocation* location);
804 809
805 // Out of resource exception helpers. 810 // Out of resource exception helpers.
806 Object* StackOverflow(); 811 Object* StackOverflow();
807 Object* TerminateExecution(); 812 Object* TerminateExecution();
808 void CancelTerminateExecution(); 813 void CancelTerminateExecution();
809 814
810 void InvokeApiInterruptCallback(); 815 void InvokeApiInterruptCallback();
811 816
812 // Administration 817 // Administration
813 void Iterate(ObjectVisitor* v); 818 void Iterate(ObjectVisitor* v);
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 void MarkCompactEpilogue(bool is_compacting, 1199 void MarkCompactEpilogue(bool is_compacting,
1195 ThreadLocalTop* archived_thread_data); 1200 ThreadLocalTop* archived_thread_data);
1196 1201
1197 void FillCache(); 1202 void FillCache();
1198 1203
1199 // Propagate pending exception message to the v8::TryCatch. 1204 // Propagate pending exception message to the v8::TryCatch.
1200 // If there is no external try-catch or message was successfully propagated, 1205 // If there is no external try-catch or message was successfully propagated,
1201 // then return true. 1206 // then return true.
1202 bool PropagatePendingExceptionToExternalTryCatch(); 1207 bool PropagatePendingExceptionToExternalTryCatch();
1203 1208
1204 Handle<JSMessageObject> CreateMessage(Handle<Object> exception,
1205 MessageLocation* location);
1206
1207 // Traverse prototype chain to find out whether the object is derived from 1209 // Traverse prototype chain to find out whether the object is derived from
1208 // the Error object. 1210 // the Error object.
1209 bool IsErrorObject(Handle<Object> obj); 1211 bool IsErrorObject(Handle<Object> obj);
1210 1212
1211 base::Atomic32 id_; 1213 base::Atomic32 id_;
1212 EntryStackItem* entry_stack_; 1214 EntryStackItem* entry_stack_;
1213 int stack_trace_nesting_level_; 1215 int stack_trace_nesting_level_;
1214 StringStream* incomplete_message_; 1216 StringStream* incomplete_message_;
1215 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT 1217 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT
1216 Bootstrapper* bootstrapper_; 1218 Bootstrapper* bootstrapper_;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 } 1538 }
1537 1539
1538 EmbeddedVector<char, 128> filename_; 1540 EmbeddedVector<char, 128> filename_;
1539 FILE* file_; 1541 FILE* file_;
1540 int scope_depth_; 1542 int scope_depth_;
1541 }; 1543 };
1542 1544
1543 } } // namespace v8::internal 1545 } } // namespace v8::internal
1544 1546
1545 #endif // V8_ISOLATE_H_ 1547 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698