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

Side by Side Diff: src/handles.cc

Issue 402034: Make sure to retry SetHiddenPropertiesObject if it (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 320 }
321 321
322 // Only attempt to find the hidden properties in the local object and not 322 // Only attempt to find the hidden properties in the local object and not
323 // in the prototype chain. Note that HasLocalProperty() can cause a GC in 323 // in the prototype chain. Note that HasLocalProperty() can cause a GC in
324 // the general case in the presence of interceptors. 324 // the general case in the presence of interceptors.
325 if (!obj->HasHiddenPropertiesObject()) { 325 if (!obj->HasHiddenPropertiesObject()) {
326 // Hidden properties object not found. Allocate a new hidden properties 326 // Hidden properties object not found. Allocate a new hidden properties
327 // object if requested. Otherwise return the undefined value. 327 // object if requested. Otherwise return the undefined value.
328 if (create_if_needed) { 328 if (create_if_needed) {
329 Handle<Object> hidden_obj = Factory::NewJSObject(Top::object_function()); 329 Handle<Object> hidden_obj = Factory::NewJSObject(Top::object_function());
330 return Handle<Object>(obj->SetHiddenPropertiesObject(*hidden_obj)); 330 CALL_HEAP_FUNCTION(obj->SetHiddenPropertiesObject(*hidden_obj), Object);
331 } else { 331 } else {
332 return Factory::undefined_value(); 332 return Factory::undefined_value();
333 } 333 }
334 } 334 }
335 return Handle<Object>(obj->GetHiddenPropertiesObject()); 335 return Handle<Object>(obj->GetHiddenPropertiesObject());
336 } 336 }
337 337
338 338
339 Handle<Object> DeleteElement(Handle<JSObject> obj, 339 Handle<Object> DeleteElement(Handle<JSObject> obj,
340 uint32_t index) { 340 uint32_t index) {
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map); 780 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map);
781 obj->set_map(*new_map); 781 obj->set_map(*new_map);
782 new_map->set_needs_loading(true); 782 new_map->set_needs_loading(true);
783 // Store the lazy loading info in the constructor field. We'll 783 // Store the lazy loading info in the constructor field. We'll
784 // reestablish the constructor from the fixed array after loading. 784 // reestablish the constructor from the fixed array after loading.
785 new_map->set_constructor(*arr); 785 new_map->set_constructor(*arr);
786 ASSERT(!obj->IsLoaded()); 786 ASSERT(!obj->IsLoaded());
787 } 787 }
788 788
789 } } // namespace v8::internal 789 } } // 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