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

Side by Side Diff: src/objects.cc

Issue 2270005: Make intercepted properties retrievable only by getter to be not enumerable. (Closed)
Patch Set: Created 10 years, 6 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
« no previous file with comments | « no previous file | 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 } else if (!interceptor->getter()->IsUndefined()) { 2030 } else if (!interceptor->getter()->IsUndefined()) {
2031 v8::NamedPropertyGetter getter = 2031 v8::NamedPropertyGetter getter =
2032 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); 2032 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter());
2033 LOG(ApiNamedPropertyAccess("interceptor-named-get-has", this, name)); 2033 LOG(ApiNamedPropertyAccess("interceptor-named-get-has", this, name));
2034 v8::Handle<v8::Value> result; 2034 v8::Handle<v8::Value> result;
2035 { 2035 {
2036 // Leaving JavaScript. 2036 // Leaving JavaScript.
2037 VMState state(EXTERNAL); 2037 VMState state(EXTERNAL);
2038 result = getter(v8::Utils::ToLocal(name_handle), info); 2038 result = getter(v8::Utils::ToLocal(name_handle), info);
2039 } 2039 }
2040 if (!result.IsEmpty()) return NONE; 2040 if (!result.IsEmpty()) return DONT_ENUM;
2041 } 2041 }
2042 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle, 2042 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle,
2043 *name_handle, 2043 *name_handle,
2044 continue_search); 2044 continue_search);
2045 } 2045 }
2046 2046
2047 2047
2048 PropertyAttributes JSObject::GetPropertyAttributeWithReceiver( 2048 PropertyAttributes JSObject::GetPropertyAttributeWithReceiver(
2049 JSObject* receiver, 2049 JSObject* receiver,
2050 String* key) { 2050 String* key) {
(...skipping 6657 matching lines...) Expand 10 before | Expand all | Expand 10 after
8708 if (break_point_objects()->IsUndefined()) return 0; 8708 if (break_point_objects()->IsUndefined()) return 0;
8709 // Single beak point. 8709 // Single beak point.
8710 if (!break_point_objects()->IsFixedArray()) return 1; 8710 if (!break_point_objects()->IsFixedArray()) return 1;
8711 // Multiple break points. 8711 // Multiple break points.
8712 return FixedArray::cast(break_point_objects())->length(); 8712 return FixedArray::cast(break_point_objects())->length();
8713 } 8713 }
8714 #endif 8714 #endif
8715 8715
8716 8716
8717 } } // namespace v8::internal 8717 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698