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

Unified Diff: include/v8.h

Issue 2404673002: [wasm] Avoid copying when deserializing wasm (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 653f260a9f12357a94db88b21a9c00e9b9a8f147..79ef0a03ea66d270d20ad0b2489ad42f0d2b9e57 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3902,6 +3902,7 @@ class V8_EXPORT Proxy : public Object {
class V8_EXPORT WasmCompiledModule : public Object {
public:
typedef std::pair<std::unique_ptr<const uint8_t[]>, size_t> SerializedModule;
+ typedef std::pair<std::unique_ptr<const uint8_t[]>, size_t> UncompiledBytes;
// Get the uncompiled bytes that were used to compile this module.
Local<String> GetUncompiledBytes();
@@ -3917,12 +3918,13 @@ class V8_EXPORT WasmCompiledModule : public Object {
// uncompiled bytes.
static MaybeLocal<WasmCompiledModule> DeserializeOrCompile(
Isolate* isolate, const SerializedModule& serialized_data,
- Local<String> uncompiled_bytes);
+ const UncompiledBytes& uncompiled_bytes);
V8_INLINE static WasmCompiledModule* Cast(Value* obj);
private:
static MaybeLocal<WasmCompiledModule> Compile(Isolate* isolate,
- Local<String> bytes);
+ const uint8_t* start,
+ size_t length);
WasmCompiledModule();
static void CheckCast(Value* obj);
};
« 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