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

Side by Side Diff: src/objects.cc

Issue 14707011: Return failure when allocating maps fails. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after
2578 descriptors - descriptor); 2578 descriptors - descriptor);
2579 } 2579 }
2580 2580
2581 Map* new_map = split_map; 2581 Map* new_map = split_map;
2582 // Add missing transitions. 2582 // Add missing transitions.
2583 for (; descriptor < descriptors; descriptor++) { 2583 for (; descriptor < descriptors; descriptor++) {
2584 MaybeObject* maybe_map = new_map->CopyInstallDescriptors( 2584 MaybeObject* maybe_map = new_map->CopyInstallDescriptors(
2585 descriptor, new_descriptors); 2585 descriptor, new_descriptors);
2586 if (!maybe_map->To(&new_map)) { 2586 if (!maybe_map->To(&new_map)) {
2587 // Create a handle for the last created map to ensure it stays alive 2587 // Create a handle for the last created map to ensure it stays alive
2588 // during GC. Its descriptor array is too large, but it will be 2588 // during GC. Its descriptor array is too large, but it will be
Michael Starzinger 2013/05/10 17:42:22 OMG, that is an epic hack you have going on here .
2589 // overwritten during retry anyway. 2589 // overwritten during retry anyway.
2590 Handle<Map>(new_map); 2590 Handle<Map>(new_map);
2591 return maybe_map;
2591 } 2592 }
2592 } 2593 }
2593 2594
2594 new_map->set_owns_descriptors(true); 2595 new_map->set_owns_descriptors(true);
2595 return new_map; 2596 return new_map;
2596 } 2597 }
2597 2598
2598 2599
2599 MaybeObject* JSObject::SetPropertyWithInterceptor( 2600 MaybeObject* JSObject::SetPropertyWithInterceptor(
2600 Name* name, 2601 Name* name,
(...skipping 12673 matching lines...) Expand 10 before | Expand all | Expand 10 after
15274 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 15275 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
15275 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 15276 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
15276 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 15277 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
15277 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 15278 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
15278 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 15279 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
15279 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 15280 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
15280 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 15281 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
15281 } 15282 }
15282 15283
15283 } } // namespace v8::internal 15284 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698