| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 Handle<Object> attributes); | 1836 Handle<Object> attributes); |
| 1837 MUST_USE_RESULT static Object* DefineProperties(Isolate* isolate, | 1837 MUST_USE_RESULT static Object* DefineProperties(Isolate* isolate, |
| 1838 Handle<Object> object, | 1838 Handle<Object> object, |
| 1839 Handle<Object> properties); | 1839 Handle<Object> properties); |
| 1840 | 1840 |
| 1841 // "virtual" dispatcher to the correct [[DefineOwnProperty]] implementation. | 1841 // "virtual" dispatcher to the correct [[DefineOwnProperty]] implementation. |
| 1842 static bool DefineOwnProperty(Isolate* isolate, Handle<JSReceiver> object, | 1842 static bool DefineOwnProperty(Isolate* isolate, Handle<JSReceiver> object, |
| 1843 Handle<Object> key, PropertyDescriptor* desc, | 1843 Handle<Object> key, PropertyDescriptor* desc, |
| 1844 ShouldThrow should_throw); | 1844 ShouldThrow should_throw); |
| 1845 | 1845 |
| 1846 // ES6 9.1.6.1 |
| 1846 static bool OrdinaryDefineOwnProperty(Isolate* isolate, | 1847 static bool OrdinaryDefineOwnProperty(Isolate* isolate, |
| 1847 Handle<JSObject> object, | 1848 Handle<JSObject> object, |
| 1848 Handle<Object> key, | 1849 Handle<Object> key, |
| 1849 PropertyDescriptor* desc, | 1850 PropertyDescriptor* desc, |
| 1850 ShouldThrow should_throw); | 1851 ShouldThrow should_throw); |
| 1851 static bool OrdinaryDefineOwnProperty(LookupIterator* it, | 1852 static bool OrdinaryDefineOwnProperty(LookupIterator* it, |
| 1852 PropertyDescriptor* desc, | 1853 PropertyDescriptor* desc, |
| 1853 ShouldThrow should_throw); | 1854 ShouldThrow should_throw); |
| 1855 // ES6 9.1.6.2 |
| 1856 static bool IsCompatiblePropertyDescriptor(bool extensible, |
| 1857 PropertyDescriptor* desc, |
| 1858 PropertyDescriptor* current, |
| 1859 Handle<Name> property_name); |
| 1860 // ES6 9.1.6.3 |
| 1861 // |it| can be NULL in cases where the ES spec passes |undefined| as the |
| 1862 // receiver. Exactly one of |it| and |property_name| must be provided. |
| 1863 static bool ValidateAndApplyPropertyDescriptor( |
| 1864 LookupIterator* it, bool extensible, PropertyDescriptor* desc, |
| 1865 PropertyDescriptor* current, ShouldThrow should_throw, |
| 1866 Handle<Name> property_name = Handle<Name>()); |
| 1854 | 1867 |
| 1855 static bool GetOwnPropertyDescriptor(Isolate* isolate, | 1868 static bool GetOwnPropertyDescriptor(Isolate* isolate, |
| 1856 Handle<JSReceiver> object, | 1869 Handle<JSReceiver> object, |
| 1857 Handle<Object> key, | 1870 Handle<Object> key, |
| 1858 PropertyDescriptor* desc); | 1871 PropertyDescriptor* desc); |
| 1859 static bool GetOwnPropertyDescriptor(LookupIterator* it, | 1872 static bool GetOwnPropertyDescriptor(LookupIterator* it, |
| 1860 PropertyDescriptor* desc); | 1873 PropertyDescriptor* desc); |
| 1861 | 1874 |
| 1862 // Disallow further properties to be added to the object. This is | 1875 // Disallow further properties to be added to the object. This is |
| 1863 // ES6's [[PreventExtensions]] when passed DONT_THROW. | 1876 // ES6's [[PreventExtensions]] when passed DONT_THROW. |
| (...skipping 8830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10694 } | 10707 } |
| 10695 return value; | 10708 return value; |
| 10696 } | 10709 } |
| 10697 }; | 10710 }; |
| 10698 | 10711 |
| 10699 | 10712 |
| 10700 } // NOLINT, false-positive due to second-order macros. | 10713 } // NOLINT, false-positive due to second-order macros. |
| 10701 } // NOLINT, false-positive due to second-order macros. | 10714 } // NOLINT, false-positive due to second-order macros. |
| 10702 | 10715 |
| 10703 #endif // V8_OBJECTS_H_ | 10716 #endif // V8_OBJECTS_H_ |
| OLD | NEW |