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

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

Issue 115020: Merge bleeding_edge@1868 to 0.3 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/0.3/
Patch Set: Created 11 years, 7 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/api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_1"); \ 230 v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_1"); \
231 } \ 231 } \
232 if (!__object__->IsRetryAfterGC()) return RETURN_EMPTY; \ 232 if (!__object__->IsRetryAfterGC()) return RETURN_EMPTY; \
233 Counters::gc_last_resort_from_handles.Increment(); \ 233 Counters::gc_last_resort_from_handles.Increment(); \
234 Heap::CollectAllGarbage(); \ 234 Heap::CollectAllGarbage(); \
235 { \ 235 { \
236 AlwaysAllocateScope __scope__; \ 236 AlwaysAllocateScope __scope__; \
237 __object__ = FUNCTION_CALL; \ 237 __object__ = FUNCTION_CALL; \
238 } \ 238 } \
239 if (!__object__->IsFailure()) return RETURN_VALUE; \ 239 if (!__object__->IsFailure()) return RETURN_VALUE; \
240 if (__object__->IsOutOfMemoryFailure()) { \ 240 if (__object__->IsOutOfMemoryFailure() || \
241 __object__->IsRetryAfterGC()) { \
241 /* TODO(1181417): Fix this. */ \ 242 /* TODO(1181417): Fix this. */ \
242 v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_2"); \ 243 v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_2"); \
243 } \ 244 } \
244 ASSERT(!__object__->IsRetryAfterGC()); \
245 return RETURN_EMPTY; \ 245 return RETURN_EMPTY; \
246 } while (false) 246 } while (false)
247 247
248 248
249 #define CALL_HEAP_FUNCTION(FUNCTION_CALL, TYPE) \ 249 #define CALL_HEAP_FUNCTION(FUNCTION_CALL, TYPE) \
250 CALL_AND_RETRY(FUNCTION_CALL, \ 250 CALL_AND_RETRY(FUNCTION_CALL, \
251 Handle<TYPE>(TYPE::cast(__object__)), \ 251 Handle<TYPE>(TYPE::cast(__object__)), \
252 Handle<TYPE>()) 252 Handle<TYPE>())
253 253
254 254
255 #define CALL_HEAP_FUNCTION_VOID(FUNCTION_CALL) \ 255 #define CALL_HEAP_FUNCTION_VOID(FUNCTION_CALL) \
256 CALL_AND_RETRY(FUNCTION_CALL, , ) 256 CALL_AND_RETRY(FUNCTION_CALL, , )
257 257
258 258
259 #ifdef DEBUG 259 #ifdef DEBUG
260 260
261 inline bool Heap::allow_allocation(bool new_state) { 261 inline bool Heap::allow_allocation(bool new_state) {
262 bool old = allocation_allowed_; 262 bool old = allocation_allowed_;
263 allocation_allowed_ = new_state; 263 allocation_allowed_ = new_state;
264 return old; 264 return old;
265 } 265 }
266 266
267 #endif 267 #endif
268 268
269 269
270 } } // namespace v8::internal 270 } } // namespace v8::internal
271 271
272 #endif // V8_HEAP_INL_H_ 272 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698