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

Side by Side Diff: src/heap-inl.h

Issue 24302009: Correctly check for AllowHeapAllocation::IsAllowed(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | test/cctest/cctest.status » ('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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 203
204 MaybeObject* Heap::CopyFixedDoubleArray(FixedDoubleArray* src) { 204 MaybeObject* Heap::CopyFixedDoubleArray(FixedDoubleArray* src) {
205 return CopyFixedDoubleArrayWithMap(src, src->map()); 205 return CopyFixedDoubleArrayWithMap(src, src->map());
206 } 206 }
207 207
208 208
209 MaybeObject* Heap::AllocateRaw(int size_in_bytes, 209 MaybeObject* Heap::AllocateRaw(int size_in_bytes,
210 AllocationSpace space, 210 AllocationSpace space,
211 AllocationSpace retry_space) { 211 AllocationSpace retry_space) {
212 ASSERT(AllowHandleAllocation::IsAllowed() && gc_state_ == NOT_IN_GC); 212 ASSERT(AllowHandleAllocation::IsAllowed());
213 ASSERT(AllowHeapAllocation::IsAllowed());
214 ASSERT(gc_state_ == NOT_IN_GC);
213 ASSERT(space != NEW_SPACE || 215 ASSERT(space != NEW_SPACE ||
214 retry_space == OLD_POINTER_SPACE || 216 retry_space == OLD_POINTER_SPACE ||
215 retry_space == OLD_DATA_SPACE || 217 retry_space == OLD_DATA_SPACE ||
216 retry_space == LO_SPACE); 218 retry_space == LO_SPACE);
217 #ifdef DEBUG 219 #ifdef DEBUG
218 if (FLAG_gc_interval >= 0 && 220 if (FLAG_gc_interval >= 0 &&
219 !disallow_allocation_failure_ && 221 !disallow_allocation_failure_ &&
220 Heap::allocation_timeout_-- <= 0) { 222 Heap::allocation_timeout_-- <= 0) {
221 return Failure::RetryAfterGC(space); 223 return Failure::RetryAfterGC(space);
222 } 224 }
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 #ifdef DEBUG 881 #ifdef DEBUG
880 Isolate* isolate = Isolate::Current(); 882 Isolate* isolate = Isolate::Current();
881 isolate->heap()->disallow_allocation_failure_ = old_state_; 883 isolate->heap()->disallow_allocation_failure_ = old_state_;
882 #endif 884 #endif
883 } 885 }
884 886
885 887
886 } } // namespace v8::internal 888 } } // namespace v8::internal
887 889
888 #endif // V8_HEAP_INL_H_ 890 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698