OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/keys.h" | 5 #include "src/keys.h" |
6 | 6 |
7 #include "src/api-arguments.h" | 7 #include "src/api-arguments.h" |
8 #include "src/elements.h" | 8 #include "src/elements.h" |
9 #include "src/factory.h" | 9 #include "src/factory.h" |
10 #include "src/identity-map.h" | 10 #include "src/identity-map.h" |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 } | 888 } |
889 // 21. Return trapResult. | 889 // 21. Return trapResult. |
890 return AddKeysFromJSProxy(proxy, trap_result); | 890 return AddKeysFromJSProxy(proxy, trap_result); |
891 } | 891 } |
892 | 892 |
893 Maybe<bool> KeyAccumulator::CollectOwnJSProxyTargetKeys( | 893 Maybe<bool> KeyAccumulator::CollectOwnJSProxyTargetKeys( |
894 Handle<JSProxy> proxy, Handle<JSReceiver> target) { | 894 Handle<JSProxy> proxy, Handle<JSReceiver> target) { |
895 // TODO(cbruni): avoid creating another KeyAccumulator | 895 // TODO(cbruni): avoid creating another KeyAccumulator |
896 Handle<FixedArray> keys; | 896 Handle<FixedArray> keys; |
897 ASSIGN_RETURN_ON_EXCEPTION_VALUE( | 897 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
898 isolate_, keys, | 898 isolate_, keys, JSReceiver::OwnPropertyKeys(target), Nothing<bool>()); |
899 KeyAccumulator::GetKeys(target, KeyCollectionMode::kOwnOnly, filter_, | |
900 GetKeysConversion::kConvertToString, | |
901 filter_proxy_keys_, is_for_in_), | |
902 Nothing<bool>()); | |
903 bool prev_filter_proxy_keys_ = filter_proxy_keys_; | |
904 NextPrototype(); // Prepare for accumulating keys. | 899 NextPrototype(); // Prepare for accumulating keys. |
905 bool prev_filter_proxy_keys_ = filter_proxy_keys_; | 900 bool prev_filter_proxy_keys_ = filter_proxy_keys_; |
906 filter_proxy_keys_ = false; | 901 filter_proxy_keys_ = false; |
907 Maybe<bool> result = AddKeysFromJSProxy(proxy, keys); | 902 Maybe<bool> result = AddKeysFromJSProxy(proxy, keys); |
908 filter_proxy_keys_ = prev_filter_proxy_keys_; | 903 filter_proxy_keys_ = prev_filter_proxy_keys_; |
909 return result; | 904 return result; |
910 } | 905 } |
911 | 906 |
912 } // namespace internal | 907 } // namespace internal |
913 } // namespace v8 | 908 } // namespace v8 |
OLD | NEW |