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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // situation where the caller does not have access. | 135 // situation where the caller does not have access. |
136 if (it.state() == LookupIterator::ACCESS_CHECK) { | 136 if (it.state() == LookupIterator::ACCESS_CHECK) { |
137 CHECK(it.HasAccess()); | 137 CHECK(it.HasAccess()); |
138 it.Next(); | 138 it.Next(); |
139 } | 139 } |
140 CHECK_EQ(LookupIterator::ACCESSOR, it.state()); | 140 CHECK_EQ(LookupIterator::ACCESSOR, it.state()); |
141 | 141 |
142 Handle<Object> old_value; | 142 Handle<Object> old_value; |
143 bool is_observed = observe && receiver->map()->is_observed(); | 143 bool is_observed = observe && receiver->map()->is_observed(); |
144 if (is_observed) { | 144 if (is_observed) { |
145 MaybeHandle<Object> maybe_old = | 145 MaybeHandle<Object> maybe_old = Object::GetPropertyWithAccessor(&it); |
146 Object::GetPropertyWithAccessor(&it, SLOPPY); | |
147 if (!maybe_old.ToHandle(&old_value)) return maybe_old; | 146 if (!maybe_old.ToHandle(&old_value)) return maybe_old; |
148 } | 147 } |
149 | 148 |
150 it.ReconfigureDataProperty(value, it.property_attributes()); | 149 it.ReconfigureDataProperty(value, it.property_attributes()); |
151 | 150 |
152 if (is_observed && !old_value->SameValue(*value)) { | 151 if (is_observed && !old_value->SameValue(*value)) { |
153 return JSObject::EnqueueChangeRecord(receiver, "update", name, old_value); | 152 return JSObject::EnqueueChangeRecord(receiver, "update", name, old_value); |
154 } | 153 } |
155 | 154 |
156 return value; | 155 return value; |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 Isolate* isolate = name->GetIsolate(); | 1204 Isolate* isolate = name->GetIsolate(); |
1206 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, | 1205 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, |
1207 &ModuleSetExport, attributes); | 1206 &ModuleSetExport, attributes); |
1208 info->set_data(Smi::FromInt(index)); | 1207 info->set_data(Smi::FromInt(index)); |
1209 return info; | 1208 return info; |
1210 } | 1209 } |
1211 | 1210 |
1212 | 1211 |
1213 } // namespace internal | 1212 } // namespace internal |
1214 } // namespace v8 | 1213 } // namespace v8 |
OLD | NEW |