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

Unified Diff: src/objects.cc

Issue 3836001: Get rid of requested size in RetryAfterGC. (Closed)
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 59ed1de37522b2966f725471635d6cf7a27ada59..17a6a58e31a222f967f652682ed8c8bc2a8200ff 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -574,28 +574,6 @@ void Failure::FailurePrint() {
}
-Failure* Failure::RetryAfterGC(int requested_bytes, AllocationSpace space) {
- ASSERT((space & ~kSpaceTagMask) == 0);
- // TODO(X64): Stop using Smi validation for non-smi checks, even if they
- // happen to be identical at the moment.
-
- int requested = requested_bytes >> kObjectAlignmentBits;
- int value = (requested << kSpaceTagSize) | space;
- // We can't very well allocate a heap number in this situation, and if the
- // requested memory is so large it seems reasonable to say that this is an
- // out of memory situation. This fixes a crash in
- // js1_5/Regress/regress-303213.js.
- if (value >> kSpaceTagSize != requested ||
- !Smi::IsValid(value) ||
- value != ((value << kFailureTypeTagSize) >> kFailureTypeTagSize) ||
- !Smi::IsValid(value << kFailureTypeTagSize)) {
- Top::context()->mark_out_of_memory();
- return Failure::OutOfMemoryException();
- }
- return Construct(RETRY_AFTER_GC, value);
-}
-
-
// Should a word be prefixed by 'a' or 'an' in order to read naturally in
// English? Returns false for non-ASCII or words that don't start with
// a capital letter. The a/an rule follows pronunciation in English.
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698