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

Side by Side Diff: src/isolate.h

Issue 1016323002: Revert of Cleanup and unify Isolate::ReportPendingMessages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_stack-handler-4
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 <queue> 8 #include <queue>
9 #include "include/v8-debug.h" 9 #include "include/v8-debug.h"
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 // Find the correct handler for the current pending exception. This also 760 // Find the correct handler for the current pending exception. This also
761 // clears and returns the current pending exception. 761 // clears and returns the current pending exception.
762 Object* FindHandler(); 762 Object* FindHandler();
763 763
764 // Tries to predict whether the exception will be caught. Note that this can 764 // Tries to predict whether the exception will be caught. Note that this can
765 // only produce an estimate, because it is undecidable whether a finally 765 // only produce an estimate, because it is undecidable whether a finally
766 // clause will consume or re-throw an exception. We conservatively assume any 766 // clause will consume or re-throw an exception. We conservatively assume any
767 // finally clause will behave as if the exception were consumed. 767 // finally clause will behave as if the exception were consumed.
768 bool PredictWhetherExceptionIsCaught(Object* exception); 768 bool PredictWhetherExceptionIsCaught(Object* exception);
769 769
770 // Propagate pending exception message to potential v8::TryCatch. Also call
771 // message handlers when the exception is guaranteed not to be caught.
772 void ReportPendingMessages();
773
774 void ScheduleThrow(Object* exception); 770 void ScheduleThrow(Object* exception);
775 // Re-set pending message, script and positions reported to the TryCatch 771 // Re-set pending message, script and positions reported to the TryCatch
776 // back to the TLS for re-use when rethrowing. 772 // back to the TLS for re-use when rethrowing.
777 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler); 773 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler);
778 // Un-schedule an exception that was caught by a TryCatch handler. 774 // Un-schedule an exception that was caught by a TryCatch handler.
779 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler); 775 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler);
776 void ReportPendingMessages();
780 // Return pending location if any or unfilled structure. 777 // Return pending location if any or unfilled structure.
781 MessageLocation GetMessageLocation(); 778 MessageLocation GetMessageLocation();
782 779
783 // Promote a scheduled exception to pending. Asserts has_scheduled_exception. 780 // Promote a scheduled exception to pending. Asserts has_scheduled_exception.
784 Object* PromoteScheduledException(); 781 Object* PromoteScheduledException();
785 782
786 // Attempts to compute the current source location, storing the 783 // Attempts to compute the current source location, storing the
787 // result in the target out parameter. 784 // result in the target out parameter.
788 void ComputeLocation(MessageLocation* target); 785 void ComputeLocation(MessageLocation* target);
789 bool ComputeLocationFromException(MessageLocation* target, 786 bool ComputeLocationFromException(MessageLocation* target,
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 1208
1212 void InitializeThreadLocal(); 1209 void InitializeThreadLocal();
1213 1210
1214 void MarkCompactPrologue(bool is_compacting, 1211 void MarkCompactPrologue(bool is_compacting,
1215 ThreadLocalTop* archived_thread_data); 1212 ThreadLocalTop* archived_thread_data);
1216 void MarkCompactEpilogue(bool is_compacting, 1213 void MarkCompactEpilogue(bool is_compacting,
1217 ThreadLocalTop* archived_thread_data); 1214 ThreadLocalTop* archived_thread_data);
1218 1215
1219 void FillCache(); 1216 void FillCache();
1220 1217
1218 // Propagate pending exception message to the v8::TryCatch.
1219 // If there is no external try-catch or message was successfully propagated,
1220 // then return true.
1221 bool PropagatePendingExceptionToExternalTryCatch();
1222
1221 // Traverse prototype chain to find out whether the object is derived from 1223 // Traverse prototype chain to find out whether the object is derived from
1222 // the Error object. 1224 // the Error object.
1223 bool IsErrorObject(Handle<Object> obj); 1225 bool IsErrorObject(Handle<Object> obj);
1224 1226
1225 base::Atomic32 id_; 1227 base::Atomic32 id_;
1226 EntryStackItem* entry_stack_; 1228 EntryStackItem* entry_stack_;
1227 int stack_trace_nesting_level_; 1229 int stack_trace_nesting_level_;
1228 StringStream* incomplete_message_; 1230 StringStream* incomplete_message_;
1229 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT 1231 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT
1230 Bootstrapper* bootstrapper_; 1232 Bootstrapper* bootstrapper_;
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 } 1563 }
1562 1564
1563 EmbeddedVector<char, 128> filename_; 1565 EmbeddedVector<char, 128> filename_;
1564 FILE* file_; 1566 FILE* file_;
1565 int scope_depth_; 1567 int scope_depth_;
1566 }; 1568 };
1567 1569
1568 } } // namespace v8::internal 1570 } } // namespace v8::internal
1569 1571
1570 #endif // V8_ISOLATE_H_ 1572 #endif // V8_ISOLATE_H_
OLDNEW
« 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