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 4035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4046 return {buff.first.get(), buff.second}; | 4046 return {buff.first.get(), buff.second}; |
4047 } | 4047 } |
4048 | 4048 |
4049 WasmCompiledModule(); | 4049 WasmCompiledModule(); |
4050 static void CheckCast(Value* obj); | 4050 static void CheckCast(Value* obj); |
4051 }; | 4051 }; |
4052 | 4052 |
4053 class V8_EXPORT WasmModuleObjectBuilder final { | 4053 class V8_EXPORT WasmModuleObjectBuilder final { |
4054 public: | 4054 public: |
4055 WasmModuleObjectBuilder(Isolate* isolate) : isolate_(isolate) {} | 4055 WasmModuleObjectBuilder(Isolate* isolate) : isolate_(isolate) {} |
4056 void OnBytesReceived(std::unique_ptr<const uint8_t[]>&& bytes, size_t size); | 4056 // The buffer passed into OnBytesReceived is owned by the caller. |
| 4057 void OnBytesReceived(const uint8_t*, size_t size); |
4057 MaybeLocal<WasmCompiledModule> Finish(); | 4058 MaybeLocal<WasmCompiledModule> Finish(); |
4058 | 4059 |
4059 private: | 4060 private: |
4060 Isolate* isolate_ = nullptr; | 4061 Isolate* isolate_ = nullptr; |
4061 // TODO(ahaas): We probably need none of this below here once streamed | 4062 // TODO(ahaas): We probably need none of this below here once streamed |
4062 // compilation is implemented. | 4063 // compilation is implemented. |
4063 typedef std::pair<std::unique_ptr<const uint8_t[]>, size_t> Buffer; | 4064 typedef std::pair<std::unique_ptr<const uint8_t[]>, size_t> Buffer; |
4064 | 4065 |
4065 // Disable copy semantics *in this implementation*. We can choose to | 4066 // Disable copy semantics *in this implementation*. We can choose to |
4066 // relax this, albeit it's not clear why. | 4067 // relax this, albeit it's not clear why. |
(...skipping 5924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9991 */ | 9992 */ |
9992 | 9993 |
9993 | 9994 |
9994 } // namespace v8 | 9995 } // namespace v8 |
9995 | 9996 |
9996 | 9997 |
9997 #undef TYPE_CHECK | 9998 #undef TYPE_CHECK |
9998 | 9999 |
9999 | 10000 |
10000 #endif // INCLUDE_V8_H_ | 10001 #endif // INCLUDE_V8_H_ |
OLD | NEW |