Chromium Code Reviews| 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 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
| 6 * | 6 * |
| 7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
| 8 * | 8 * |
| 9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
| 10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1703 virtual void ThrowDataCloneError(Local<String> message) = 0; | 1703 virtual void ThrowDataCloneError(Local<String> message) = 0; |
| 1704 | 1704 |
| 1705 /* | 1705 /* |
| 1706 * The embedder overrides this method to write some kind of host object, if | 1706 * The embedder overrides this method to write some kind of host object, if |
| 1707 * possible. If not, a suitable exception should be thrown and | 1707 * possible. If not, a suitable exception should be thrown and |
| 1708 * Nothing<bool>() returned. | 1708 * Nothing<bool>() returned. |
| 1709 */ | 1709 */ |
| 1710 virtual Maybe<bool> WriteHostObject(Isolate* isolate, Local<Object> object); | 1710 virtual Maybe<bool> WriteHostObject(Isolate* isolate, Local<Object> object); |
| 1711 | 1711 |
| 1712 /* | 1712 /* |
| 1713 * Called when the ValueSerializer is going to serialize a | |
| 1714 * SharedArrayBuffer object. The embedder must return an ID for the | |
| 1715 * object, using the same ID if this SharedArrayBuffer has already been | |
| 1716 * serialized in this buffer. When deserializing, this ID will be passed to | |
| 1717 * ValueDeserializer::TransferSharedArrayBuffer as |transfer_id|. | |
| 1718 * | |
| 1719 * If the object cannot be serialized, an | |
| 1720 * exception should be thrown and Nothing<uint32_t>() returned. | |
| 1721 */ | |
| 1722 virtual Maybe<uint32_t> TransferSharedArrayBuffer(Isolate* isolate, | |
|
jbroman
2016/12/13 20:56:00
Do we want to use the word "transfer" here, given
binji
2016/12/14 23:58:30
AIUI, the thought is that transferring is defined
binji
2016/12/15 23:24:45
I went with GetSharedArrayBufferId, I think that's
| |
| 1723 Local<Object> object); | |
|
jbroman
2016/12/13 20:56:00
I'd expect the argument to be Local<SharedArrayBuf
binji
2016/12/14 23:58:30
Done.
| |
| 1724 | |
| 1725 /* | |
| 1713 * Allocates memory for the buffer of at least the size provided. The actual | 1726 * Allocates memory for the buffer of at least the size provided. The actual |
| 1714 * size (which may be greater or equal) is written to |actual_size|. If no | 1727 * size (which may be greater or equal) is written to |actual_size|. If no |
| 1715 * buffer has been allocated yet, nullptr will be provided. | 1728 * buffer has been allocated yet, nullptr will be provided. |
| 1716 */ | 1729 */ |
| 1717 virtual void* ReallocateBufferMemory(void* old_buffer, size_t size, | 1730 virtual void* ReallocateBufferMemory(void* old_buffer, size_t size, |
| 1718 size_t* actual_size); | 1731 size_t* actual_size); |
| 1719 | 1732 |
| 1720 /* | 1733 /* |
| 1721 * Frees a buffer allocated with |ReallocateBufferMemory|. | 1734 * Frees a buffer allocated with |ReallocateBufferMemory|. |
| 1722 */ | 1735 */ |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1756 * Marks an ArrayBuffer as havings its contents transferred out of band. | 1769 * Marks an ArrayBuffer as havings its contents transferred out of band. |
| 1757 * Pass the corresponding JSArrayBuffer in the deserializing context to | 1770 * Pass the corresponding JSArrayBuffer in the deserializing context to |
| 1758 * ValueDeserializer::TransferArrayBuffer. | 1771 * ValueDeserializer::TransferArrayBuffer. |
| 1759 */ | 1772 */ |
| 1760 void TransferArrayBuffer(uint32_t transfer_id, | 1773 void TransferArrayBuffer(uint32_t transfer_id, |
| 1761 Local<ArrayBuffer> array_buffer); | 1774 Local<ArrayBuffer> array_buffer); |
| 1762 | 1775 |
| 1763 /* | 1776 /* |
| 1764 * Similar to TransferArrayBuffer, but for SharedArrayBuffer. | 1777 * Similar to TransferArrayBuffer, but for SharedArrayBuffer. |
| 1765 */ | 1778 */ |
| 1766 void TransferSharedArrayBuffer(uint32_t transfer_id, | 1779 V8_DEPRECATE_SOON("Use Delegate::TransferSharedArrayBuffer", |
| 1767 Local<SharedArrayBuffer> shared_array_buffer); | 1780 void TransferSharedArrayBuffer( |
| 1781 uint32_t transfer_id, | |
| 1782 Local<SharedArrayBuffer> shared_array_buffer)); | |
| 1768 | 1783 |
| 1769 /* | 1784 /* |
| 1770 * Write raw data in various common formats to the buffer. | 1785 * Write raw data in various common formats to the buffer. |
| 1771 * Note that integer types are written in base-128 varint format, not with a | 1786 * Note that integer types are written in base-128 varint format, not with a |
| 1772 * binary copy. For use during an override of Delegate::WriteHostObject. | 1787 * binary copy. For use during an override of Delegate::WriteHostObject. |
| 1773 */ | 1788 */ |
| 1774 void WriteUint32(uint32_t value); | 1789 void WriteUint32(uint32_t value); |
| 1775 void WriteUint64(uint64_t value); | 1790 void WriteUint64(uint64_t value); |
| 1776 void WriteDouble(double value); | 1791 void WriteDouble(double value); |
| 1777 void WriteRawBytes(const void* source, size_t length); | 1792 void WriteRawBytes(const void* source, size_t length); |
| (...skipping 7923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9701 */ | 9716 */ |
| 9702 | 9717 |
| 9703 | 9718 |
| 9704 } // namespace v8 | 9719 } // namespace v8 |
| 9705 | 9720 |
| 9706 | 9721 |
| 9707 #undef TYPE_CHECK | 9722 #undef TYPE_CHECK |
| 9708 | 9723 |
| 9709 | 9724 |
| 9710 #endif // INCLUDE_V8_H_ | 9725 #endif // INCLUDE_V8_H_ |
| OLD | NEW |