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

Unified Diff: src/top.h

Issue 3970005: Make Failure inherit from MaybeObject instead of Object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 2 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 | « src/stub-cache.cc ('k') | src/top.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/top.h
===================================================================
--- src/top.h (revision 5696)
+++ src/top.h (working copy)
@@ -84,7 +84,7 @@
// lookups.
Context* context_;
int thread_id_;
- Object* pending_exception_;
+ MaybeObject* pending_exception_;
bool has_pending_message_;
const char* pending_message_;
Object* pending_message_obj_;
@@ -94,7 +94,7 @@
// Use a separate value for scheduled exceptions to preserve the
// invariants that hold about pending_exception. We may want to
// unify them later.
- Object* scheduled_exception_;
+ MaybeObject* scheduled_exception_;
bool external_caught_exception_;
SaveContext* save_context_;
v8::TryCatch* catcher_;
@@ -165,21 +165,21 @@
static void set_thread_id(int id) { thread_local_.thread_id_ = id; }
// Interface to pending exception.
- static Object* pending_exception() {
+ static MaybeObject* pending_exception() {
ASSERT(has_pending_exception());
return thread_local_.pending_exception_;
}
static bool external_caught_exception() {
return thread_local_.external_caught_exception_;
}
- static void set_pending_exception(Object* exception) {
+ static void set_pending_exception(MaybeObject* exception) {
thread_local_.pending_exception_ = exception;
}
static void clear_pending_exception() {
thread_local_.pending_exception_ = Heap::the_hole_value();
}
- static Object** pending_exception_address() {
+ static MaybeObject** pending_exception_address() {
return &thread_local_.pending_exception_;
}
static bool has_pending_exception() {
@@ -208,11 +208,11 @@
return &thread_local_.external_caught_exception_;
}
- static Object** scheduled_exception_address() {
+ static MaybeObject** scheduled_exception_address() {
return &thread_local_.scheduled_exception_;
}
- static Object* scheduled_exception() {
+ static MaybeObject* scheduled_exception() {
ASSERT(has_scheduled_exception());
return thread_local_.scheduled_exception_;
}
@@ -302,14 +302,15 @@
// Re-throw an exception. This involves no error reporting since
// error reporting was handled when the exception was thrown
// originally.
- static Failure* ReThrow(Object* exception, MessageLocation* location = NULL);
+ static Failure* ReThrow(MaybeObject* exception,
+ MessageLocation* location = NULL);
static void ScheduleThrow(Object* exception);
static void ReportPendingMessages();
static Failure* ThrowIllegalOperation();
// Promote a scheduled exception to pending. Asserts has_scheduled_exception.
- static Object* PromoteScheduledException();
- static void DoThrow(Object* exception,
+ static Failure* PromoteScheduledException();
+ static void DoThrow(MaybeObject* exception,
MessageLocation* location,
const char* message);
static bool ShouldReturnException(bool* is_caught_externally,
« no previous file with comments | « src/stub-cache.cc ('k') | src/top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698