Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: include/v8.h

Issue 2797653002: [wasm] Module Builder v8 API: bytes passed in are owned by caller. (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698