| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 Isolate* isolate, Handle<Object> receiver, Handle<JSObject> holder, | 139 Isolate* isolate, Handle<Object> receiver, Handle<JSObject> holder, |
| 140 Handle<Name> name, Handle<Object> value) { | 140 Handle<Name> name, Handle<Object> value) { |
| 141 LookupIterator it(receiver, name, holder, | 141 LookupIterator it(receiver, name, holder, |
| 142 LookupIterator::OWN_SKIP_INTERCEPTOR); | 142 LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 143 // Skip any access checks we might hit. This accessor should never hit in a | 143 // Skip any access checks we might hit. This accessor should never hit in a |
| 144 // situation where the caller does not have access. | 144 // situation where the caller does not have access. |
| 145 if (it.state() == LookupIterator::ACCESS_CHECK) { | 145 if (it.state() == LookupIterator::ACCESS_CHECK) { |
| 146 CHECK(it.HasAccess()); | 146 CHECK(it.HasAccess()); |
| 147 it.Next(); | 147 it.Next(); |
| 148 } | 148 } |
| 149 DCHECK(holder.is_identical_to(it.GetHolder<JSObject>())); |
| 149 CHECK_EQ(LookupIterator::ACCESSOR, it.state()); | 150 CHECK_EQ(LookupIterator::ACCESSOR, it.state()); |
| 150 it.ReconfigureDataProperty(value, it.property_attributes()); | 151 it.ReconfigureDataProperty(value, it.property_attributes()); |
| 151 return value; | 152 return value; |
| 152 } | 153 } |
| 153 | 154 |
| 154 } // namespace | 155 } // namespace |
| 155 | 156 |
| 156 void Accessors::ReconfigureToDataProperty( | 157 void Accessors::ReconfigureToDataProperty( |
| 157 v8::Local<v8::Name> key, v8::Local<v8::Value> val, | 158 v8::Local<v8::Name> key, v8::Local<v8::Value> val, |
| 158 const v8::PropertyCallbackInfo<void>& info) { | 159 const v8::PropertyCallbackInfo<void>& info) { |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 Isolate* isolate = name->GetIsolate(); | 1210 Isolate* isolate = name->GetIsolate(); |
| 1210 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, | 1211 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, |
| 1211 &ModuleSetExport, attributes); | 1212 &ModuleSetExport, attributes); |
| 1212 info->set_data(Smi::FromInt(index)); | 1213 info->set_data(Smi::FromInt(index)); |
| 1213 return info; | 1214 return info; |
| 1214 } | 1215 } |
| 1215 | 1216 |
| 1216 | 1217 |
| 1217 } // namespace internal | 1218 } // namespace internal |
| 1218 } // namespace v8 | 1219 } // namespace v8 |
| OLD | NEW |