OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 elms->set(ENUMERABLE_INDEX, heap->ToBoolean((attrs & DONT_ENUM) == 0)); | 223 elms->set(ENUMERABLE_INDEX, heap->ToBoolean((attrs & DONT_ENUM) == 0)); |
224 elms->set(CONFIGURABLE_INDEX, heap->ToBoolean((attrs & DONT_DELETE) == 0)); | 224 elms->set(CONFIGURABLE_INDEX, heap->ToBoolean((attrs & DONT_DELETE) == 0)); |
225 | 225 |
226 bool is_accessor_pair = it.state() == LookupIterator::ACCESSOR && | 226 bool is_accessor_pair = it.state() == LookupIterator::ACCESSOR && |
227 it.GetAccessors()->IsAccessorPair(); | 227 it.GetAccessors()->IsAccessorPair(); |
228 elms->set(IS_ACCESSOR_INDEX, heap->ToBoolean(is_accessor_pair)); | 228 elms->set(IS_ACCESSOR_INDEX, heap->ToBoolean(is_accessor_pair)); |
229 | 229 |
230 if (is_accessor_pair) { | 230 if (is_accessor_pair) { |
231 Handle<AccessorPair> accessors = | 231 Handle<AccessorPair> accessors = |
232 Handle<AccessorPair>::cast(it.GetAccessors()); | 232 Handle<AccessorPair>::cast(it.GetAccessors()); |
233 Handle<Object> getter(accessors->GetComponent(ACCESSOR_GETTER), isolate); | 233 Handle<Object> getter = |
234 Handle<Object> setter(accessors->GetComponent(ACCESSOR_SETTER), isolate); | 234 AccessorPair::GetComponent(accessors, ACCESSOR_GETTER); |
| 235 Handle<Object> setter = |
| 236 AccessorPair::GetComponent(accessors, ACCESSOR_SETTER); |
235 elms->set(GETTER_INDEX, *getter); | 237 elms->set(GETTER_INDEX, *getter); |
236 elms->set(SETTER_INDEX, *setter); | 238 elms->set(SETTER_INDEX, *setter); |
237 } else { | 239 } else { |
238 Handle<Object> value; | 240 Handle<Object> value; |
239 ASSIGN_RETURN_ON_EXCEPTION(isolate, value, Object::GetProperty(&it), | 241 ASSIGN_RETURN_ON_EXCEPTION(isolate, value, Object::GetProperty(&it), |
240 Object); | 242 Object); |
241 elms->set(WRITABLE_INDEX, heap->ToBoolean((attrs & READ_ONLY) == 0)); | 243 elms->set(WRITABLE_INDEX, heap->ToBoolean((attrs & READ_ONLY) == 0)); |
242 elms->set(VALUE_INDEX, *value); | 244 elms->set(VALUE_INDEX, *value); |
243 } | 245 } |
244 | 246 |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 DCHECK(args.length() == 2); | 1303 DCHECK(args.length() == 2); |
1302 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); | 1304 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); |
1303 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); | 1305 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); |
1304 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 1306 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
1305 isolate, o, JSReceiver::DefineProperties(isolate, o, properties)); | 1307 isolate, o, JSReceiver::DefineProperties(isolate, o, properties)); |
1306 return *o; | 1308 return *o; |
1307 } | 1309 } |
1308 | 1310 |
1309 } // namespace internal | 1311 } // namespace internal |
1310 } // namespace v8 | 1312 } // namespace v8 |
OLD | NEW |