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

Side by Side Diff: src/objects.cc

Issue 378583002: Revert "Treat ExecutableAccessorInfo as regular data properties." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/ic.cc ('k') | test/cctest/test-api.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 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 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 case INTERCEPTOR: { 3087 case INTERCEPTOR: {
3088 LookupIterator it(object, name, handle(result.holder())); 3088 LookupIterator it(object, name, handle(result.holder()));
3089 PropertyAttributes attr = GetPropertyAttributes(&it); 3089 PropertyAttributes attr = GetPropertyAttributes(&it);
3090 *done = !!(attr & READ_ONLY); 3090 *done = !!(attr & READ_ONLY);
3091 break; 3091 break;
3092 } 3092 }
3093 case CALLBACKS: { 3093 case CALLBACKS: {
3094 *done = true; 3094 *done = true;
3095 if (!result.IsReadOnly()) { 3095 if (!result.IsReadOnly()) {
3096 Handle<Object> callback_object(result.GetCallbackObject(), isolate); 3096 Handle<Object> callback_object(result.GetCallbackObject(), isolate);
3097 // Only store via executable access info setters if the holder is the
3098 // receiver or on its hidden prototype chain.
3099 if (callback_object->IsExecutableAccessorInfo()) {
3100 Handle<JSObject> current = object;
3101 while (*current != result.holder()) {
3102 // There is a callbacks holder, so we are guaranteed that all
3103 // objects in between are JSObjects.
3104 Handle<JSObject> prototype(
3105 JSObject::cast(current->GetPrototype()));
3106 if (!current->IsJSGlobalProxy() &&
3107 !prototype->map()->is_hidden_prototype()) {
3108 *done = false;
3109 break;
3110 }
3111 current = prototype;
3112 }
3113 // Break out of the switch after breaking out of the loop above.
3114 if (*current != result.holder()) break;
3115 }
3116 return SetPropertyWithCallback(object, name, value, 3097 return SetPropertyWithCallback(object, name, value,
3117 handle(result.holder()), 3098 handle(result.holder()),
3118 callback_object, strict_mode); 3099 callback_object, strict_mode);
3119 } 3100 }
3120 break; 3101 break;
3121 } 3102 }
3122 case HANDLER: { 3103 case HANDLER: {
3123 Handle<JSProxy> proxy(result.proxy()); 3104 Handle<JSProxy> proxy(result.proxy());
3124 return JSProxy::SetPropertyViaPrototypesWithHandler( 3105 return JSProxy::SetPropertyViaPrototypesWithHandler(
3125 proxy, object, name, value, attributes, strict_mode, done); 3106 proxy, object, name, value, attributes, strict_mode, done);
(...skipping 13879 matching lines...) Expand 10 before | Expand all | Expand 10 after
17005 #define ERROR_MESSAGES_TEXTS(C, T) T, 16986 #define ERROR_MESSAGES_TEXTS(C, T) T,
17006 static const char* error_messages_[] = { 16987 static const char* error_messages_[] = {
17007 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16988 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17008 }; 16989 };
17009 #undef ERROR_MESSAGES_TEXTS 16990 #undef ERROR_MESSAGES_TEXTS
17010 return error_messages_[reason]; 16991 return error_messages_[reason];
17011 } 16992 }
17012 16993
17013 16994
17014 } } // namespace v8::internal 16995 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698