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

Side by Side Diff: src/objects.cc

Issue 6246054: Properly process getOwnPropertyDescriptor for elements on global proxy object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 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/runtime.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 6661 matching lines...) Expand 10 before | Expand all | Expand 10 after
6672 6672
6673 6673
6674 JSObject::LocalElementType JSObject::HasLocalElement(uint32_t index) { 6674 JSObject::LocalElementType JSObject::HasLocalElement(uint32_t index) {
6675 // Check access rights if needed. 6675 // Check access rights if needed.
6676 if (IsAccessCheckNeeded() && 6676 if (IsAccessCheckNeeded() &&
6677 !Top::MayIndexedAccess(this, index, v8::ACCESS_HAS)) { 6677 !Top::MayIndexedAccess(this, index, v8::ACCESS_HAS)) {
6678 Top::ReportFailedAccessCheck(this, v8::ACCESS_HAS); 6678 Top::ReportFailedAccessCheck(this, v8::ACCESS_HAS);
6679 return UNDEFINED_ELEMENT; 6679 return UNDEFINED_ELEMENT;
6680 } 6680 }
6681 6681
6682 if (IsJSGlobalProxy()) {
6683 Object* proto = GetPrototype();
6684 if (proto->IsNull()) return UNDEFINED_ELEMENT;
6685 ASSERT(proto->IsJSGlobalObject());
6686 return JSObject::cast(proto)->HasLocalElement(index);
6687 }
6688
6682 // Check for lookup interceptor 6689 // Check for lookup interceptor
6683 if (HasIndexedInterceptor()) { 6690 if (HasIndexedInterceptor()) {
6684 return HasElementWithInterceptor(this, index) ? INTERCEPTED_ELEMENT 6691 return HasElementWithInterceptor(this, index) ? INTERCEPTED_ELEMENT
6685 : UNDEFINED_ELEMENT; 6692 : UNDEFINED_ELEMENT;
6686 } 6693 }
6687 6694
6688 // Handle [] on String objects. 6695 // Handle [] on String objects.
6689 if (this->IsStringObjectWithCharacterAt(index)) { 6696 if (this->IsStringObjectWithCharacterAt(index)) {
6690 return STRING_CHARACTER_ELEMENT; 6697 return STRING_CHARACTER_ELEMENT;
6691 } 6698 }
(...skipping 3179 matching lines...) Expand 10 before | Expand all | Expand 10 after
9871 if (break_point_objects()->IsUndefined()) return 0; 9878 if (break_point_objects()->IsUndefined()) return 0;
9872 // Single beak point. 9879 // Single beak point.
9873 if (!break_point_objects()->IsFixedArray()) return 1; 9880 if (!break_point_objects()->IsFixedArray()) return 1;
9874 // Multiple break points. 9881 // Multiple break points.
9875 return FixedArray::cast(break_point_objects())->length(); 9882 return FixedArray::cast(break_point_objects())->length();
9876 } 9883 }
9877 #endif 9884 #endif
9878 9885
9879 9886
9880 } } // namespace v8::internal 9887 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698