| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2425 */ | 2425 */ |
| 2426 static Local<ArrayBuffer> New(void* data, size_t byte_length); | 2426 static Local<ArrayBuffer> New(void* data, size_t byte_length); |
| 2427 | 2427 |
| 2428 /** | 2428 /** |
| 2429 * Returns true if ArrayBuffer is extrenalized, that is, does not | 2429 * Returns true if ArrayBuffer is extrenalized, that is, does not |
| 2430 * own its memory block. | 2430 * own its memory block. |
| 2431 */ | 2431 */ |
| 2432 bool IsExternal() const; | 2432 bool IsExternal() const; |
| 2433 | 2433 |
| 2434 /** | 2434 /** |
| 2435 * Neuters this ArrayBuffer and all its views (typed arrays). |
| 2436 * Neutering sets the byte length of the buffer and all typed arrays to zero, |
| 2437 * preventing JavaScript from ever accessing underlying backing store. |
| 2438 * ArrayBuffer should have been externalized. |
| 2439 */ |
| 2440 void Neuter(); |
| 2441 |
| 2442 /** |
| 2435 * Pass the ownership of this ArrayBuffer's backing store to | 2443 * Pass the ownership of this ArrayBuffer's backing store to |
| 2436 * a given ArrayBufferContents. | 2444 * a given ArrayBufferContents. |
| 2437 */ | 2445 */ |
| 2438 void Externalize(ArrayBufferContents* contents); | 2446 void Externalize(ArrayBufferContents* contents); |
| 2439 | 2447 |
| 2440 V8_INLINE(static ArrayBuffer* Cast(Value* obj)); | 2448 V8_INLINE(static ArrayBuffer* Cast(Value* obj)); |
| 2441 | 2449 |
| 2442 | 2450 |
| 2443 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; | 2451 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; |
| 2444 | 2452 |
| (...skipping 3865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6310 | 6318 |
| 6311 | 6319 |
| 6312 } // namespace v8 | 6320 } // namespace v8 |
| 6313 | 6321 |
| 6314 | 6322 |
| 6315 #undef V8EXPORT | 6323 #undef V8EXPORT |
| 6316 #undef TYPE_CHECK | 6324 #undef TYPE_CHECK |
| 6317 | 6325 |
| 6318 | 6326 |
| 6319 #endif // V8_H_ | 6327 #endif // V8_H_ |
| OLD | NEW |