OLD | NEW |
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 | 1049 |
1050 /** | 1050 /** |
1051 * A JavaScript object (ECMA-262, 4.3.3) | 1051 * A JavaScript object (ECMA-262, 4.3.3) |
1052 */ | 1052 */ |
1053 class V8EXPORT Object : public Value { | 1053 class V8EXPORT Object : public Value { |
1054 public: | 1054 public: |
1055 bool Set(Handle<Value> key, | 1055 bool Set(Handle<Value> key, |
1056 Handle<Value> value, | 1056 Handle<Value> value, |
1057 PropertyAttribute attribs = None); | 1057 PropertyAttribute attribs = None); |
1058 | 1058 |
1059 // Sets a local property on this object, bypassing interceptors and | 1059 // Sets a local property on this object bypassing interceptors and |
1060 // overriding accessors or read-only properties. | 1060 // overriding accessors or read-only properties. |
1061 // | 1061 // |
1062 // Note that if the object has an interceptor the property will be set | 1062 // Note that if the object has an interceptor the property will be set |
1063 // locally, but since the interceptor takes precedence the local property | 1063 // locally, but since the interceptor takes precedence the local property |
1064 // will only be returned if the interceptor doesn't return a value. | 1064 // will only be returned if the interceptor doesn't return a value. |
1065 // | 1065 // |
1066 // Note also that this only works for named properties. | 1066 // Note also that this only works for named properties. |
1067 bool ForceSet(Handle<Value> key, | 1067 bool ForceSet(Handle<Value> key, |
1068 Handle<Value> value, | 1068 Handle<Value> value, |
1069 PropertyAttribute attribs = None); | 1069 PropertyAttribute attribs = None); |
| 1070 |
1070 Local<Value> Get(Handle<Value> key); | 1071 Local<Value> Get(Handle<Value> key); |
1071 | 1072 |
1072 // TODO(1245389): Replace the type-specific versions of these | 1073 // TODO(1245389): Replace the type-specific versions of these |
1073 // functions with generic ones that accept a Handle<Value> key. | 1074 // functions with generic ones that accept a Handle<Value> key. |
1074 bool Has(Handle<String> key); | 1075 bool Has(Handle<String> key); |
| 1076 |
1075 bool Delete(Handle<String> key); | 1077 bool Delete(Handle<String> key); |
| 1078 |
| 1079 // Delete a property on this object bypassing interceptors and |
| 1080 // ignoring dont-delete attributes. |
| 1081 bool ForceDelete(Handle<Value> key); |
| 1082 |
1076 bool Has(uint32_t index); | 1083 bool Has(uint32_t index); |
| 1084 |
1077 bool Delete(uint32_t index); | 1085 bool Delete(uint32_t index); |
1078 | 1086 |
1079 /** | 1087 /** |
1080 * Returns an array containing the names of the enumerable properties | 1088 * Returns an array containing the names of the enumerable properties |
1081 * of this object, including properties from prototype objects. The | 1089 * of this object, including properties from prototype objects. The |
1082 * array returned by this method contains the same values as would | 1090 * array returned by this method contains the same values as would |
1083 * be enumerated by a for-in statement over this object. | 1091 * be enumerated by a for-in statement over this object. |
1084 */ | 1092 */ |
1085 Local<Array> GetPropertyNames(); | 1093 Local<Array> GetPropertyNames(); |
1086 | 1094 |
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2609 | 2617 |
2610 } // namespace v8 | 2618 } // namespace v8 |
2611 | 2619 |
2612 | 2620 |
2613 #undef V8EXPORT | 2621 #undef V8EXPORT |
2614 #undef V8EXPORT_INLINE | 2622 #undef V8EXPORT_INLINE |
2615 #undef TYPE_CHECK | 2623 #undef TYPE_CHECK |
2616 | 2624 |
2617 | 2625 |
2618 #endif // V8_H_ | 2626 #endif // V8_H_ |
OLD | NEW |