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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 */ | 1294 */ |
1295 typedef Handle<Array> (*IndexedPropertyEnumerator)(const AccessorInfo& info); | 1295 typedef Handle<Array> (*IndexedPropertyEnumerator)(const AccessorInfo& info); |
1296 | 1296 |
1297 | 1297 |
1298 /** | 1298 /** |
1299 * Access control specifications. | 1299 * Access control specifications. |
1300 * | 1300 * |
1301 * Some accessors should be accessible across contexts. These | 1301 * Some accessors should be accessible across contexts. These |
1302 * accessors have an explicit access control parameter which specifies | 1302 * accessors have an explicit access control parameter which specifies |
1303 * the kind of cross-context access that should be allowed. | 1303 * the kind of cross-context access that should be allowed. |
| 1304 * |
| 1305 * Additionally, for security, accessors can prohibit overwriting by |
| 1306 * accessors defined in JavaScript. For objects that have such |
| 1307 * accessors either locally or in their prototype chain it is not |
| 1308 * possible to overwrite the accessor by using __defineGetter__ or |
| 1309 * __defineSetter__ from JavaScript code. |
1304 */ | 1310 */ |
1305 enum AccessControl { | 1311 enum AccessControl { |
1306 DEFAULT = 0, | 1312 DEFAULT = 0, |
1307 ALL_CAN_READ = 1, | 1313 ALL_CAN_READ = 1, |
1308 ALL_CAN_WRITE = 2 | 1314 ALL_CAN_WRITE = 1 << 1, |
| 1315 PROHIBITS_OVERWRITING = 1 << 2 |
1309 }; | 1316 }; |
1310 | 1317 |
1311 | 1318 |
1312 /** | 1319 /** |
1313 * Access type specification. | 1320 * Access type specification. |
1314 */ | 1321 */ |
1315 enum AccessType { | 1322 enum AccessType { |
1316 ACCESS_GET, | 1323 ACCESS_GET, |
1317 ACCESS_SET, | 1324 ACCESS_SET, |
1318 ACCESS_HAS, | 1325 ACCESS_HAS, |
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2424 | 2431 |
2425 } // namespace v8 | 2432 } // namespace v8 |
2426 | 2433 |
2427 | 2434 |
2428 #undef EXPORT | 2435 #undef EXPORT |
2429 #undef EXPORT_INLINE | 2436 #undef EXPORT_INLINE |
2430 #undef TYPE_CHECK | 2437 #undef TYPE_CHECK |
2431 | 2438 |
2432 | 2439 |
2433 #endif // V8_H_ | 2440 #endif // V8_H_ |
OLD | NEW |