Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: src/runtime/runtime-object.cc

Issue 1488873003: [proxies] Implement Symbol/DONT_ENUM filtering for GetKeys() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: moved filtering into KeyAccumulator Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/harmony/proxies-keys.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 return *result; 970 return *result;
971 } 971 }
972 } 972 }
973 return isolate->heap()->undefined_value(); 973 return isolate->heap()->undefined_value();
974 } 974 }
975 975
976 976
977 RUNTIME_FUNCTION(Runtime_OwnKeys) { 977 RUNTIME_FUNCTION(Runtime_OwnKeys) {
978 HandleScope scope(isolate); 978 HandleScope scope(isolate);
979 DCHECK(args.length() == 1); 979 DCHECK(args.length() == 1);
980 CONVERT_ARG_CHECKED(JSObject, raw_object, 0); 980 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
981 Handle<JSObject> object(raw_object);
982 981
983 Handle<FixedArray> contents; 982 Handle<FixedArray> contents;
984 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 983 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
985 isolate, contents, JSReceiver::GetKeys(object, JSReceiver::OWN_ONLY, 984 isolate, contents, JSReceiver::GetKeys(object, JSReceiver::OWN_ONLY,
986 SKIP_SYMBOLS, CONVERT_TO_STRING)); 985 SKIP_SYMBOLS, CONVERT_TO_STRING));
987 return *isolate->factory()->NewJSArrayWithElements(contents); 986 return *isolate->factory()->NewJSArrayWithElements(contents);
988 } 987 }
989 988
990 989
991 RUNTIME_FUNCTION(Runtime_ToFastProperties) { 990 RUNTIME_FUNCTION(Runtime_ToFastProperties) {
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 1573
1575 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { 1574 RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) {
1576 HandleScope scope(isolate); 1575 HandleScope scope(isolate);
1577 DCHECK(args.length() == 2); 1576 DCHECK(args.length() == 2);
1578 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); 1577 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0);
1579 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); 1578 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1);
1580 return JSReceiver::DefineProperties(isolate, o, properties); 1579 return JSReceiver::DefineProperties(isolate, o, properties);
1581 } 1580 }
1582 } // namespace internal 1581 } // namespace internal
1583 } // namespace v8 1582 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/harmony/proxies-keys.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698