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/handles.cc

Issue 400025: Merge r3323 to branches/1.3. (Closed) Base URL: http://v8.googlecode.com/svn/branches/1.3/
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 | src/version.cc » ('j') | 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 305
306 // Only attempt to find the hidden properties in the local object and not 306 // Only attempt to find the hidden properties in the local object and not
307 // in the prototype chain. Note that HasLocalProperty() can cause a GC in 307 // in the prototype chain. Note that HasLocalProperty() can cause a GC in
308 // the general case in the presence of interceptors. 308 // the general case in the presence of interceptors.
309 if (!obj->HasHiddenPropertiesObject()) { 309 if (!obj->HasHiddenPropertiesObject()) {
310 // Hidden properties object not found. Allocate a new hidden properties 310 // Hidden properties object not found. Allocate a new hidden properties
311 // object if requested. Otherwise return the undefined value. 311 // object if requested. Otherwise return the undefined value.
312 if (create_if_needed) { 312 if (create_if_needed) {
313 Handle<Object> hidden_obj = Factory::NewJSObject(Top::object_function()); 313 Handle<Object> hidden_obj = Factory::NewJSObject(Top::object_function());
314 return Handle<Object>(obj->SetHiddenPropertiesObject(*hidden_obj)); 314 CALL_HEAP_FUNCTION(obj->SetHiddenPropertiesObject(*hidden_obj), Object);
315 } else { 315 } else {
316 return Factory::undefined_value(); 316 return Factory::undefined_value();
317 } 317 }
318 } 318 }
319 return Handle<Object>(obj->GetHiddenPropertiesObject()); 319 return Handle<Object>(obj->GetHiddenPropertiesObject());
320 } 320 }
321 321
322 322
323 Handle<Object> DeleteElement(Handle<JSObject> obj, 323 Handle<Object> DeleteElement(Handle<JSObject> obj,
324 uint32_t index) { 324 uint32_t index) {
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map); 759 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map);
760 obj->set_map(*new_map); 760 obj->set_map(*new_map);
761 new_map->set_needs_loading(true); 761 new_map->set_needs_loading(true);
762 // Store the lazy loading info in the constructor field. We'll 762 // Store the lazy loading info in the constructor field. We'll
763 // reestablish the constructor from the fixed array after loading. 763 // reestablish the constructor from the fixed array after loading.
764 new_map->set_constructor(*arr); 764 new_map->set_constructor(*arr);
765 ASSERT(!obj->IsLoaded()); 765 ASSERT(!obj->IsLoaded());
766 } 766 }
767 767
768 } } // namespace v8::internal 768 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698