OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 12818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12829 | 12829 |
12830 bool JSObject::HasRealElementProperty(Isolate* isolate, uint32_t index) { | 12830 bool JSObject::HasRealElementProperty(Isolate* isolate, uint32_t index) { |
12831 // Check access rights if needed. | 12831 // Check access rights if needed. |
12832 if (IsAccessCheckNeeded()) { | 12832 if (IsAccessCheckNeeded()) { |
12833 if (!isolate->MayIndexedAccess(this, index, v8::ACCESS_HAS)) { | 12833 if (!isolate->MayIndexedAccess(this, index, v8::ACCESS_HAS)) { |
12834 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); | 12834 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); |
12835 return false; | 12835 return false; |
12836 } | 12836 } |
12837 } | 12837 } |
12838 | 12838 |
12839 if (IsJSGlobalProxy()) { | |
12840 Object* proto = GetPrototype(); | |
12841 if (proto->IsNull()) return false; | |
12842 ASSERT(proto->IsJSGlobalObject()); | |
12843 // A GlobalProxy's prototype should always be a proper JSObject. | |
adamk
2013/07/09 21:01:49
This comment is a bit redundant.
| |
12844 return JSObject::cast(proto)->HasRealElementProperty(isolate, index); | |
12845 } | |
12846 | |
12839 return GetElementAttributeWithoutInterceptor(this, index, false) != ABSENT; | 12847 return GetElementAttributeWithoutInterceptor(this, index, false) != ABSENT; |
12840 } | 12848 } |
12841 | 12849 |
12842 | 12850 |
12843 bool JSObject::HasRealNamedCallbackProperty(Isolate* isolate, Name* key) { | 12851 bool JSObject::HasRealNamedCallbackProperty(Isolate* isolate, Name* key) { |
12844 // Check access rights if needed. | 12852 // Check access rights if needed. |
12845 if (IsAccessCheckNeeded()) { | 12853 if (IsAccessCheckNeeded()) { |
12846 if (!isolate->MayNamedAccess(this, key, v8::ACCESS_HAS)) { | 12854 if (!isolate->MayNamedAccess(this, key, v8::ACCESS_HAS)) { |
12847 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); | 12855 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); |
12848 return false; | 12856 return false; |
(...skipping 3036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15885 | 15893 |
15886 void PropertyCell::AddDependentCode(Handle<Code> code) { | 15894 void PropertyCell::AddDependentCode(Handle<Code> code) { |
15887 Handle<DependentCode> codes = DependentCode::Insert( | 15895 Handle<DependentCode> codes = DependentCode::Insert( |
15888 Handle<DependentCode>(dependent_code()), | 15896 Handle<DependentCode>(dependent_code()), |
15889 DependentCode::kPropertyCellChangedGroup, code); | 15897 DependentCode::kPropertyCellChangedGroup, code); |
15890 if (*codes != dependent_code()) set_dependent_code(*codes); | 15898 if (*codes != dependent_code()) set_dependent_code(*codes); |
15891 } | 15899 } |
15892 | 15900 |
15893 | 15901 |
15894 } } // namespace v8::internal | 15902 } } // namespace v8::internal |
OLD | NEW |