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

Side by Side Diff: src/objects.cc

Issue 14365017: Propagate OOM exception instead of crashing in CALL_HEAP_FUNCTION_PASS_EXCEPTION macro. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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-inl.h ('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 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 4009 matching lines...) Expand 10 before | Expand all | Expand 10 after
4020 4020
4021 MaybeObject* JSObject::SetIdentityHash(Smi* hash, CreationFlag flag) { 4021 MaybeObject* JSObject::SetIdentityHash(Smi* hash, CreationFlag flag) {
4022 MaybeObject* maybe = SetHiddenProperty(GetHeap()->identity_hash_string(), 4022 MaybeObject* maybe = SetHiddenProperty(GetHeap()->identity_hash_string(),
4023 hash); 4023 hash);
4024 if (maybe->IsFailure()) return maybe; 4024 if (maybe->IsFailure()) return maybe;
4025 return this; 4025 return this;
4026 } 4026 }
4027 4027
4028 4028
4029 int JSObject::GetIdentityHash(Handle<JSObject> obj) { 4029 int JSObject::GetIdentityHash(Handle<JSObject> obj) {
4030 CALL_AND_RETRY(obj->GetIsolate(), 4030 CALL_AND_RETRY_OR_DIE(obj->GetIsolate(),
4031 obj->GetIdentityHash(ALLOW_CREATION), 4031 obj->GetIdentityHash(ALLOW_CREATION),
4032 return Smi::cast(__object__)->value(), 4032 return Smi::cast(__object__)->value(),
4033 return 0); 4033 return 0);
4034 } 4034 }
4035 4035
4036 4036
4037 MaybeObject* JSObject::GetIdentityHash(CreationFlag flag) { 4037 MaybeObject* JSObject::GetIdentityHash(CreationFlag flag) {
4038 Object* stored_value = GetHiddenProperty(GetHeap()->identity_hash_string()); 4038 Object* stored_value = GetHiddenProperty(GetHeap()->identity_hash_string());
4039 if (stored_value->IsSmi()) return stored_value; 4039 if (stored_value->IsSmi()) return stored_value;
4040 4040
4041 // Do not generate permanent identity hash code if not requested. 4041 // Do not generate permanent identity hash code if not requested.
4042 if (flag == OMIT_CREATION) return GetHeap()->undefined_value(); 4042 if (flag == OMIT_CREATION) return GetHeap()->undefined_value();
4043 4043
(...skipping 10461 matching lines...) Expand 10 before | Expand all | Expand 10 after
14505 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 14505 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
14506 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 14506 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
14507 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 14507 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
14508 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 14508 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
14509 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 14509 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
14510 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 14510 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
14511 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 14511 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
14512 } 14512 }
14513 14513
14514 } } // namespace v8::internal 14514 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698