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

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

Issue 2060213002: Revert of Replace all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « test/cctest/compiler/test-js-context-specialization.cc ('k') | test/cctest/heap/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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 AlwaysAllocateScope scope(CcTest::i_isolate()); 95 AlwaysAllocateScope scope(CcTest::i_isolate());
96 return handle(AllocateAfterFailures().ToObjectChecked(), CcTest::i_isolate()); 96 return handle(AllocateAfterFailures().ToObjectChecked(), CcTest::i_isolate());
97 } 97 }
98 98
99 99
100 HEAP_TEST(StressHandles) { 100 HEAP_TEST(StressHandles) {
101 v8::HandleScope scope(CcTest::isolate()); 101 v8::HandleScope scope(CcTest::isolate());
102 v8::Local<v8::Context> env = v8::Context::New(CcTest::isolate()); 102 v8::Local<v8::Context> env = v8::Context::New(CcTest::isolate());
103 env->Enter(); 103 env->Enter();
104 Handle<Object> o = TestAllocateAfterFailures(); 104 Handle<Object> o = TestAllocateAfterFailures();
105 CHECK(o->IsTrue(CcTest::i_isolate())); 105 CHECK(o->IsTrue());
106 env->Exit(); 106 env->Exit();
107 } 107 }
108 108
109 109
110 void TestGetter( 110 void TestGetter(
111 v8::Local<v8::Name> name, 111 v8::Local<v8::Name> name,
112 const v8::PropertyCallbackInfo<v8::Value>& info) { 112 const v8::PropertyCallbackInfo<v8::Value>& info) {
113 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); 113 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
114 HandleScope scope(isolate); 114 HandleScope scope(isolate);
115 info.GetReturnValue().Set(v8::Utils::ToLocal( 115 info.GetReturnValue().Set(v8::Utils::ToLocal(
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 code_range.FreeRawMemory(blocks[index].base, blocks[index].size); 243 code_range.FreeRawMemory(blocks[index].base, blocks[index].size);
244 current_allocated -= blocks[index].size; 244 current_allocated -= blocks[index].size;
245 if (index < blocks.length() - 1) { 245 if (index < blocks.length() - 1) {
246 blocks[index] = blocks.RemoveLast(); 246 blocks[index] = blocks.RemoveLast();
247 } else { 247 } else {
248 blocks.RemoveLast(); 248 blocks.RemoveLast();
249 } 249 }
250 } 250 }
251 } 251 }
252 } 252 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-js-context-specialization.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698