| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/accessors.h" | 5 #include "src/accessors.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/contexts.h" | 8 #include "src/contexts.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/execution.h" | 10 #include "src/execution.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 int descriptor = descriptors->SearchWithCache(isolate, *name, *map); | 109 int descriptor = descriptors->SearchWithCache(isolate, *name, *map); |
| 110 if (descriptor != DescriptorArray::kNotFound) return false; | 110 if (descriptor != DescriptorArray::kNotFound) return false; |
| 111 | 111 |
| 112 Handle<Object> proto = Handle<Object>(map->prototype(), isolate); | 112 Handle<Object> proto = Handle<Object>(map->prototype(), isolate); |
| 113 if (!proto->IsJSReceiver()) return false; | 113 if (!proto->IsJSReceiver()) return false; |
| 114 | 114 |
| 115 // Check if the property is defined in the prototype chain. | 115 // Check if the property is defined in the prototype chain. |
| 116 LookupIterator it(proto, name); | 116 LookupIterator it(proto, name); |
| 117 if (!it.IsFound()) return false; | 117 if (!it.IsFound()) return false; |
| 118 | 118 |
| 119 Object* original_proto = | 119 Handle<Object> typed_array_proto = isolate->typed_array_prototype(); |
| 120 JSFunction::cast(map->GetConstructor())->prototype(); | |
| 121 | 120 |
| 122 // Property is not configurable. It is enough to verify that | 121 // Property is not configurable. It is enough to verify that |
| 123 // the holder is the same. | 122 // the holder is the same. |
| 124 return *it.GetHolder<Object>() == original_proto; | 123 return *it.GetHolder<Object>() == *typed_array_proto; |
| 125 } | 124 } |
| 126 case JS_DATA_VIEW_TYPE: | 125 case JS_DATA_VIEW_TYPE: |
| 127 return CheckForName(name, isolate->factory()->byte_length_string(), | 126 return CheckForName(name, isolate->factory()->byte_length_string(), |
| 128 JSDataView::kByteLengthOffset, object_offset) || | 127 JSDataView::kByteLengthOffset, object_offset) || |
| 129 CheckForName(name, isolate->factory()->byte_offset_string(), | 128 CheckForName(name, isolate->factory()->byte_offset_string(), |
| 130 JSDataView::kByteOffsetOffset, object_offset); | 129 JSDataView::kByteOffsetOffset, object_offset); |
| 131 default: | 130 default: |
| 132 return false; | 131 return false; |
| 133 } | 132 } |
| 134 } | 133 } |
| (...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 Isolate* isolate = name->GetIsolate(); | 1203 Isolate* isolate = name->GetIsolate(); |
| 1205 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, | 1204 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, |
| 1206 &ModuleSetExport, attributes); | 1205 &ModuleSetExport, attributes); |
| 1207 info->set_data(Smi::FromInt(index)); | 1206 info->set_data(Smi::FromInt(index)); |
| 1208 return info; | 1207 return info; |
| 1209 } | 1208 } |
| 1210 | 1209 |
| 1211 | 1210 |
| 1212 } // namespace internal | 1211 } // namespace internal |
| 1213 } // namespace v8 | 1212 } // namespace v8 |
| OLD | NEW |