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

Unified Diff: test/cctest/test-alloc.cc

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/x64/stub-cache-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-alloc.cc
===================================================================
--- test/cctest/test-alloc.cc (revision 5696)
+++ test/cctest/test-alloc.cc (working copy)
@@ -35,7 +35,7 @@
using namespace v8::internal;
-static Object* AllocateAfterFailures() {
+static MaybeObject* AllocateAfterFailures() {
static int attempts = 0;
if (++attempts < 3) return Failure::RetryAfterGC();
@@ -60,7 +60,8 @@
CHECK(!Heap::AllocateFixedArray(100)->IsFailure());
CHECK(!Heap::AllocateHeapNumber(0.42)->IsFailure());
CHECK(!Heap::AllocateArgumentsObject(Smi::FromInt(87), 10)->IsFailure());
- Object* object = Heap::AllocateJSObject(*Top::object_function());
+ Object* object =
+ Heap::AllocateJSObject(*Top::object_function())->ToObjectChecked();
CHECK(!Heap::CopyJSObject(JSObject::cast(object))->IsFailure());
// Old data space.
@@ -111,7 +112,7 @@
}
-static Object* TestAccessorGet(Object* object, void*) {
+static MaybeObject* TestAccessorGet(Object* object, void*) {
return AllocateAfterFailures();
}
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698