| 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 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 // This file relies on the fact that the following declaration has been made | 7 // This file relies on the fact that the following declaration has been made |
| 8 // in runtime.js: | 8 // in runtime.js: |
| 9 // var $Array = global.Array; | 9 // var $Array = global.Array; |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 // ES6 19.1.2.8 | 70 // ES6 19.1.2.8 |
| 71 function ObjectGetOwnPropertySymbols(obj) { | 71 function ObjectGetOwnPropertySymbols(obj) { |
| 72 if (!IS_SPEC_OBJECT(obj)) { | 72 if (!IS_SPEC_OBJECT(obj)) { |
| 73 throw MakeTypeError("called_on_non_object", | 73 throw MakeTypeError("called_on_non_object", |
| 74 ["Object.getOwnPropertySymbols"]); | 74 ["Object.getOwnPropertySymbols"]); |
| 75 } | 75 } |
| 76 | 76 |
| 77 // TODO(arv): Proxies use a shared trap for String and Symbol keys. | 77 // TODO(arv): Proxies use a shared trap for String and Symbol keys. |
| 78 | 78 |
| 79 return ObjectGetOwnPropertyKeys(obj, true); | 79 return ObjectGetOwnPropertyKeys(obj, PROPERTY_ATTRIBUTES_STRING); |
| 80 } | 80 } |
| 81 | 81 |
| 82 | 82 |
| 83 //------------------------------------------------------------------- | 83 //------------------------------------------------------------------- |
| 84 | 84 |
| 85 var symbolHasInstance = InternalSymbol("Symbol.hasInstance"); | 85 var symbolHasInstance = InternalSymbol("Symbol.hasInstance"); |
| 86 var symbolIsConcatSpreadable = InternalSymbol("Symbol.isConcatSpreadable"); | 86 var symbolIsConcatSpreadable = InternalSymbol("Symbol.isConcatSpreadable"); |
| 87 var symbolIsRegExp = InternalSymbol("Symbol.isRegExp"); | 87 var symbolIsRegExp = InternalSymbol("Symbol.isRegExp"); |
| 88 var symbolIterator = InternalSymbol("Symbol.iterator"); | 88 var symbolIterator = InternalSymbol("Symbol.iterator"); |
| 89 var symbolToStringTag = InternalSymbol("Symbol.toStringTag"); | 89 var symbolToStringTag = InternalSymbol("Symbol.toStringTag"); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 function ExtendObject() { | 125 function ExtendObject() { |
| 126 %CheckIsBootstrapping(); | 126 %CheckIsBootstrapping(); |
| 127 | 127 |
| 128 InstallFunctions($Object, DONT_ENUM, $Array( | 128 InstallFunctions($Object, DONT_ENUM, $Array( |
| 129 "getOwnPropertySymbols", ObjectGetOwnPropertySymbols | 129 "getOwnPropertySymbols", ObjectGetOwnPropertySymbols |
| 130 )); | 130 )); |
| 131 } | 131 } |
| 132 | 132 |
| 133 ExtendObject(); | 133 ExtendObject(); |
| OLD | NEW |