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

Unified Diff: src/isolate.h

Issue 240053010: Return Object* instead of MaybeObject* from runtime calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix string allocation Created 6 years, 8 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
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index b3e403c56b0c71bddfb6686d102a3972a2ba25be..8bd4f822ae57ea2c25d596a93dab77c7fd3917e0 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -143,7 +143,7 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
// TODO(yangguo): Remove after we completely changed to MaybeHandles.
#define RETURN_IF_EMPTY_HANDLE(isolate, call) \
- RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception())
+ RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, isolate->heap()->exception())
// Macros for MaybeHandle.
@@ -166,7 +166,8 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
} while (false)
#define ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, dst, call) \
- ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, Failure::Exception())
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE( \
+ isolate, dst, call, isolate->heap()->exception())
#define ASSIGN_RETURN_ON_EXCEPTION(isolate, dst, call, T) \
ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, MaybeHandle<T>())
@@ -180,7 +181,7 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
} while (false)
#define RETURN_FAILURE_ON_EXCEPTION(isolate, call) \
- RETURN_ON_EXCEPTION_VALUE(isolate, call, Failure::Exception())
+ RETURN_ON_EXCEPTION_VALUE(isolate, call, isolate->heap()->exception())
#define RETURN_ON_EXCEPTION(isolate, call, T) \
RETURN_ON_EXCEPTION_VALUE(isolate, call, MaybeHandle<T>())
@@ -775,7 +776,7 @@ class Isolate {
// Exception throwing support. The caller should use the result
// of Throw() as its return value.
- Failure* Throw(Object* exception, MessageLocation* location = NULL);
+ Object* Throw(Object* exception, MessageLocation* location = NULL);
template <typename T>
MUST_USE_RESULT MaybeHandle<T> Throw(Handle<Object> exception,
@@ -787,7 +788,7 @@ class Isolate {
// Re-throw an exception. This involves no error reporting since
// error reporting was handled when the exception was thrown
// originally.
- Failure* ReThrow(Object* exception);
+ Object* ReThrow(Object* exception);
void ScheduleThrow(Object* exception);
// Re-set pending message, script and positions reported to the TryCatch
// back to the TLS for re-use when rethrowing.
@@ -795,11 +796,11 @@ class Isolate {
void ReportPendingMessages();
// Return pending location if any or unfilled structure.
MessageLocation GetMessageLocation();
- Failure* ThrowIllegalOperation();
- Failure* ThrowInvalidStringLength();
+ Object* ThrowIllegalOperation();
+ Object* ThrowInvalidStringLength();
// Promote a scheduled exception to pending. Asserts has_scheduled_exception.
- Failure* PromoteScheduledException();
+ Object* PromoteScheduledException();
void DoThrow(Object* exception, MessageLocation* location);
// Checks if exception should be reported and finds out if it's
// caught externally.
@@ -811,8 +812,8 @@ class Isolate {
void ComputeLocation(MessageLocation* target);
// Out of resource exception helpers.
- Failure* StackOverflow();
- Failure* TerminateExecution();
+ Object* StackOverflow();
+ Object* TerminateExecution();
void CancelTerminateExecution();
// Administration

Powered by Google App Engine
This is Rietveld 408576698