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

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

Issue 23480067: remove ISOLATE (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/regexp-macro-assembler-x64.cc ('k') | test/cctest/test-api.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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 CHECK(!heap->AllocateFixedArray(100, TENURED)->IsFailure()); 83 CHECK(!heap->AllocateFixedArray(100, TENURED)->IsFailure());
84 CHECK(!heap->CopyCode(Isolate::Current()->builtins()->builtin( 84 CHECK(!heap->CopyCode(Isolate::Current()->builtins()->builtin(
85 Builtins::kIllegal))->IsFailure()); 85 Builtins::kIllegal))->IsFailure());
86 86
87 // Return success. 87 // Return success.
88 return Smi::FromInt(42); 88 return Smi::FromInt(42);
89 } 89 }
90 90
91 91
92 static Handle<Object> Test() { 92 static Handle<Object> Test() {
93 CALL_HEAP_FUNCTION(ISOLATE, AllocateAfterFailures(), Object); 93 CALL_HEAP_FUNCTION(Isolate::Current(), AllocateAfterFailures(), Object);
94 } 94 }
95 95
96 96
97 TEST(StressHandles) { 97 TEST(StressHandles) {
98 v8::HandleScope scope(v8::Isolate::GetCurrent()); 98 v8::HandleScope scope(v8::Isolate::GetCurrent());
99 v8::Handle<v8::Context> env = v8::Context::New(v8::Isolate::GetCurrent()); 99 v8::Handle<v8::Context> env = v8::Context::New(v8::Isolate::GetCurrent());
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();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 if (index < blocks.length() - 1) { 219 if (index < blocks.length() - 1) {
220 blocks[index] = blocks.RemoveLast(); 220 blocks[index] = blocks.RemoveLast();
221 } else { 221 } else {
222 blocks.RemoveLast(); 222 blocks.RemoveLast();
223 } 223 }
224 } 224 }
225 } 225 }
226 226
227 code_range.TearDown(); 227 code_range.TearDown();
228 } 228 }
OLDNEW
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698