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/builtins.h" | 5 #include "src/builtins.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 | 1608 |
1609 if (!target->IsJSReceiver()) { | 1609 if (!target->IsJSReceiver()) { |
1610 THROW_NEW_ERROR_RETURN_FAILURE( | 1610 THROW_NEW_ERROR_RETURN_FAILURE( |
1611 isolate, NewTypeError(MessageTemplate::kCalledOnNonObject, | 1611 isolate, NewTypeError(MessageTemplate::kCalledOnNonObject, |
1612 isolate->factory()->NewStringFromAsciiChecked( | 1612 isolate->factory()->NewStringFromAsciiChecked( |
1613 "Reflect.ownKeys"))); | 1613 "Reflect.ownKeys"))); |
1614 } | 1614 } |
1615 | 1615 |
1616 Handle<FixedArray> keys; | 1616 Handle<FixedArray> keys; |
1617 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 1617 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
1618 isolate, keys, | 1618 isolate, keys, JSReceiver::GetKeys(Handle<JSReceiver>::cast(target), |
1619 JSReceiver::GetKeys(Handle<JSReceiver>::cast(target), | 1619 JSReceiver::OWN_ONLY, ALL_PROPERTIES, |
1620 JSReceiver::OWN_ONLY, INCLUDE_SYMBOLS, | 1620 CONVERT_TO_STRING)); |
1621 CONVERT_TO_STRING, IGNORE_ENUMERABILITY)); | |
1622 return *isolate->factory()->NewJSArrayWithElements(keys); | 1621 return *isolate->factory()->NewJSArrayWithElements(keys); |
1623 } | 1622 } |
1624 | 1623 |
1625 | 1624 |
1626 // ES6 section 26.1.12 Reflect.preventExtensions | 1625 // ES6 section 26.1.12 Reflect.preventExtensions |
1627 BUILTIN(ReflectPreventExtensions) { | 1626 BUILTIN(ReflectPreventExtensions) { |
1628 HandleScope scope(isolate); | 1627 HandleScope scope(isolate); |
1629 DCHECK_EQ(2, args.length()); | 1628 DCHECK_EQ(2, args.length()); |
1630 Handle<Object> target = args.at<Object>(1); | 1629 Handle<Object> target = args.at<Object>(1); |
1631 | 1630 |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2432 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 2431 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
2433 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 2432 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
2434 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 2433 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
2435 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 2434 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
2436 #undef DEFINE_BUILTIN_ACCESSOR_C | 2435 #undef DEFINE_BUILTIN_ACCESSOR_C |
2437 #undef DEFINE_BUILTIN_ACCESSOR_A | 2436 #undef DEFINE_BUILTIN_ACCESSOR_A |
2438 | 2437 |
2439 | 2438 |
2440 } // namespace internal | 2439 } // namespace internal |
2441 } // namespace v8 | 2440 } // namespace v8 |
OLD | NEW |