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

Side by Side Diff: test/cctest/test-alloc.cc

Issue 245963007: Clean up some uses of Failures and MaybeObjects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-heap.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 TEST(StressHandles) { 97 TEST(StressHandles) {
98 v8::HandleScope scope(CcTest::isolate()); 98 v8::HandleScope scope(CcTest::isolate());
99 v8::Handle<v8::Context> env = v8::Context::New(CcTest::isolate()); 99 v8::Handle<v8::Context> env = v8::Context::New(CcTest::isolate());
100 env->Enter(); 100 env->Enter();
101 Handle<Object> o = Test(); 101 Handle<Object> o = Test();
102 CHECK(o->IsSmi() && Smi::cast(*o)->value() == 42); 102 CHECK(o->IsSmi() && Smi::cast(*o)->value() == 42);
103 env->Exit(); 103 env->Exit();
104 } 104 }
105 105
106 106
107 static MaybeObject* TestAccessorGet(Isolate* isolate, Object* object, void*) { 107 static Object* TestAccessorGet(Isolate* isolate, Object* object, void*) {
108 return AllocateAfterFailures(); 108 return *Test();
109 } 109 }
110 110
111 111
112 const AccessorDescriptor kDescriptor = { 112 const AccessorDescriptor kDescriptor = {
113 TestAccessorGet, 113 TestAccessorGet,
114 0, 114 0,
115 0 115 0
116 }; 116 };
117 117
118 118
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (index < blocks.length() - 1) { 216 if (index < blocks.length() - 1) {
217 blocks[index] = blocks.RemoveLast(); 217 blocks[index] = blocks.RemoveLast();
218 } else { 218 } else {
219 blocks.RemoveLast(); 219 blocks.RemoveLast();
220 } 220 }
221 } 221 }
222 } 222 }
223 223
224 code_range.TearDown(); 224 code_range.TearDown();
225 } 225 }
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698