Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 77df498a07f1612bdc5f6c80183c7860121f9a4d..6292f50407ea0e56f362e091aa6ef7130430a0a5 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -1563,6 +1563,21 @@ BUILTIN(ObjectFreeze) { |
} |
+// ES6 section 19.1.2.8 Object.getOwnPropertySymbols ( O ) |
+BUILTIN(ObjectGetOwnPropertySymbols) { |
+ HandleScope scope(isolate); |
+ Handle<Object> object = args.atOrUndefined(isolate, 1); |
+ Handle<JSReceiver> receiver; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, receiver, |
+ Execution::ToObject(isolate, object)); |
+ Handle<FixedArray> keys; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
+ isolate, keys, JSReceiver::GetKeys(receiver, JSReceiver::OWN_ONLY, |
+ SKIP_STRINGS, CONVERT_TO_STRING)); |
+ return *isolate->factory()->NewJSArrayWithElements(keys); |
+} |
+ |
+ |
// ES6 section 19.1.2.11 Object.isExtensible ( O ) |
BUILTIN(ObjectIsExtensible) { |
HandleScope scope(isolate); |