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

Side by Side Diff: src/objects.cc

Issue 8055008: Merge revision 9434 to trunk (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 9 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 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3006 matching lines...) Expand 10 before | Expand all | Expand 10 after
3017 // in the prototype chain. 3017 // in the prototype chain.
3018 if (!obj->HasHiddenPropertiesObject()) { 3018 if (!obj->HasHiddenPropertiesObject()) {
3019 // Hidden properties object not found. Allocate a new hidden properties 3019 // Hidden properties object not found. Allocate a new hidden properties
3020 // object if requested. Otherwise return the undefined value. 3020 // object if requested. Otherwise return the undefined value.
3021 if (flag == ALLOW_CREATION) { 3021 if (flag == ALLOW_CREATION) {
3022 Object* hidden_obj; 3022 Object* hidden_obj;
3023 { MaybeObject* maybe_obj = heap->AllocateJSObject( 3023 { MaybeObject* maybe_obj = heap->AllocateJSObject(
3024 isolate->context()->global_context()->object_function()); 3024 isolate->context()->global_context()->object_function());
3025 if (!maybe_obj->ToObject(&hidden_obj)) return maybe_obj; 3025 if (!maybe_obj->ToObject(&hidden_obj)) return maybe_obj;
3026 } 3026 }
3027 // Don't allow leakage of the hidden object through accessors
3028 // on Object.prototype.
3029 {
3030 MaybeObject* maybe_obj =
3031 JSObject::cast(hidden_obj)->SetPrototype(heap->null_value(), false);
3032 if (maybe_obj->IsFailure()) return maybe_obj;
3033 }
3027 return obj->SetHiddenPropertiesObject(hidden_obj); 3034 return obj->SetHiddenPropertiesObject(hidden_obj);
3028 } else { 3035 } else {
3029 return heap->undefined_value(); 3036 return heap->undefined_value();
3030 } 3037 }
3031 } 3038 }
3032 return obj->GetHiddenPropertiesObject(); 3039 return obj->GetHiddenPropertiesObject();
3033 } 3040 }
3034 3041
3035 3042
3036 MaybeObject* JSObject::GetIdentityHash(HiddenPropertiesFlag flag) { 3043 MaybeObject* JSObject::GetIdentityHash(HiddenPropertiesFlag flag) {
(...skipping 8554 matching lines...) Expand 10 before | Expand all | Expand 10 after
11591 if (break_point_objects()->IsUndefined()) return 0; 11598 if (break_point_objects()->IsUndefined()) return 0;
11592 // Single break point. 11599 // Single break point.
11593 if (!break_point_objects()->IsFixedArray()) return 1; 11600 if (!break_point_objects()->IsFixedArray()) return 1;
11594 // Multiple break points. 11601 // Multiple break points.
11595 return FixedArray::cast(break_point_objects())->length(); 11602 return FixedArray::cast(break_point_objects())->length();
11596 } 11603 }
11597 #endif 11604 #endif
11598 11605
11599 11606
11600 } } // namespace v8::internal 11607 } } // 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