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

Side by Side Diff: src/objects.cc

Issue 502903002: Remove HolderIsNonGlobalHiddenPrototype since OWN* now also checks globals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove explicit JSGlobalObject check since it's always either that or Null Created 6 years, 4 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
« src/lookup-inl.h ('K') | « src/lookup-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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 3794 matching lines...) Expand 10 before | Expand all | Expand 10 after
3805 3805
3806 // Reconfigures a property to a data property with attributes, even if it is not 3806 // Reconfigures a property to a data property with attributes, even if it is not
3807 // reconfigurable. 3807 // reconfigurable.
3808 MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes( 3808 MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
3809 Handle<JSObject> object, 3809 Handle<JSObject> object,
3810 Handle<Name> name, 3810 Handle<Name> name,
3811 Handle<Object> value, 3811 Handle<Object> value,
3812 PropertyAttributes attributes, 3812 PropertyAttributes attributes,
3813 ExecutableAccessorInfoHandling handling) { 3813 ExecutableAccessorInfoHandling handling) {
3814 DCHECK(!value->IsTheHole()); 3814 DCHECK(!value->IsTheHole());
3815 LookupIterator it(object, name, LookupIterator::HIDDEN_SKIP_INTERCEPTOR); 3815 LookupIterator it(object, name, LookupIterator::OWN_SKIP_INTERCEPTOR);
3816 bool is_observed = object->map()->is_observed() && 3816 bool is_observed = object->map()->is_observed() &&
3817 *name != it.isolate()->heap()->hidden_string(); 3817 *name != it.isolate()->heap()->hidden_string();
3818 for (; it.IsFound(); it.Next()) { 3818 for (; it.IsFound(); it.Next()) {
3819 switch (it.state()) { 3819 switch (it.state()) {
3820 case LookupIterator::INTERCEPTOR: 3820 case LookupIterator::INTERCEPTOR:
3821 case LookupIterator::JSPROXY: 3821 case LookupIterator::JSPROXY:
3822 case LookupIterator::NOT_FOUND: 3822 case LookupIterator::NOT_FOUND:
3823 case LookupIterator::TRANSITION: 3823 case LookupIterator::TRANSITION:
3824 UNREACHABLE(); 3824 UNREACHABLE();
3825 3825
3826 case LookupIterator::ACCESS_CHECK: 3826 case LookupIterator::ACCESS_CHECK:
3827 if (!it.isolate()->MayNamedAccess(object, name, v8::ACCESS_SET)) { 3827 if (!it.isolate()->MayNamedAccess(object, name, v8::ACCESS_SET)) {
3828 return SetPropertyWithFailedAccessCheck(&it, value, SLOPPY); 3828 return SetPropertyWithFailedAccessCheck(&it, value, SLOPPY);
3829 } 3829 }
3830 break; 3830 break;
3831 3831
3832 case LookupIterator::PROPERTY: { 3832 case LookupIterator::PROPERTY: {
3833 if (!it.HasProperty()) break; 3833 if (!it.HasProperty()) break;
3834 if (it.HolderIsNonGlobalHiddenPrototype()) break;
3835 PropertyDetails details = it.property_details(); 3834 PropertyDetails details = it.property_details();
3836 Handle<Object> old_value = it.isolate()->factory()->the_hole_value(); 3835 Handle<Object> old_value = it.isolate()->factory()->the_hole_value();
3837 switch (it.property_kind()) { 3836 switch (it.property_kind()) {
3838 case LookupIterator::ACCESSOR: { 3837 case LookupIterator::ACCESSOR: {
3839 // Ensure the context isn't changed after calling into accessors. 3838 // Ensure the context isn't changed after calling into accessors.
3840 AssertNoContextChange ncc(it.isolate()); 3839 AssertNoContextChange ncc(it.isolate());
3841 3840
3842 Handle<Object> accessors = it.GetAccessors(); 3841 Handle<Object> accessors = it.GetAccessors();
3843 3842
3844 if (is_observed && accessors->IsAccessorInfo()) { 3843 if (is_observed && accessors->IsAccessorInfo()) {
(...skipping 12585 matching lines...) Expand 10 before | Expand all | Expand 10 after
16430 #define ERROR_MESSAGES_TEXTS(C, T) T, 16429 #define ERROR_MESSAGES_TEXTS(C, T) T,
16431 static const char* error_messages_[] = { 16430 static const char* error_messages_[] = {
16432 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16431 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16433 }; 16432 };
16434 #undef ERROR_MESSAGES_TEXTS 16433 #undef ERROR_MESSAGES_TEXTS
16435 return error_messages_[reason]; 16434 return error_messages_[reason];
16436 } 16435 }
16437 16436
16438 16437
16439 } } // namespace v8::internal 16438 } } // namespace v8::internal
OLDNEW
« src/lookup-inl.h ('K') | « src/lookup-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698