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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 } | 846 } |
847 // 21. Return trapResult. | 847 // 21. Return trapResult. |
848 return AddKeysFromJSProxy(proxy, trap_result); | 848 return AddKeysFromJSProxy(proxy, trap_result); |
849 } | 849 } |
850 | 850 |
851 Maybe<bool> KeyAccumulator::CollectOwnJSProxyTargetKeys( | 851 Maybe<bool> KeyAccumulator::CollectOwnJSProxyTargetKeys( |
852 Handle<JSProxy> proxy, Handle<JSReceiver> target) { | 852 Handle<JSProxy> proxy, Handle<JSReceiver> target) { |
853 // TODO(cbruni): avoid creating another KeyAccumulator | 853 // TODO(cbruni): avoid creating another KeyAccumulator |
854 Handle<FixedArray> keys; | 854 Handle<FixedArray> keys; |
855 ASSIGN_RETURN_ON_EXCEPTION_VALUE( | 855 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
856 isolate_, keys, JSReceiver::OwnPropertyKeys(target), Nothing<bool>()); | 856 isolate_, keys, |
| 857 KeyAccumulator::GetKeys(target, KeyCollectionMode::kOwnOnly, filter_, |
| 858 GetKeysConversion::kConvertToString, |
| 859 filter_proxy_keys_, is_for_in_), |
| 860 Nothing<bool>()); |
857 bool prev_filter_proxy_keys_ = filter_proxy_keys_; | 861 bool prev_filter_proxy_keys_ = filter_proxy_keys_; |
858 filter_proxy_keys_ = false; | 862 filter_proxy_keys_ = false; |
859 Maybe<bool> result = AddKeysFromJSProxy(proxy, keys); | 863 Maybe<bool> result = AddKeysFromJSProxy(proxy, keys); |
860 filter_proxy_keys_ = prev_filter_proxy_keys_; | 864 filter_proxy_keys_ = prev_filter_proxy_keys_; |
861 return result; | 865 return result; |
862 } | 866 } |
863 | 867 |
864 } // namespace internal | 868 } // namespace internal |
865 } // namespace v8 | 869 } // namespace v8 |
OLD | NEW |