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

Unified Diff: include/v8.h

Issue 2395793003: [wasm] Support recompilation if deserialization fails. (Closed)
Patch Set: [wasm] recompile if needed when deserializing 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') | src/api.cc » ('J')
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 36edf5334a9d27c4cec2ba8238eab8ee808dea8e..9aed9b2b057fcb1d7b04ba53b20f47ab16bfc1d0 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3902,13 +3902,23 @@ 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;
+ // Get the uncompiled bytes that were used to compile this module.
+ Local<String> GetUncompiledBytes();
+ // Serialize the compiled module. The serialized data does not include the
+ // uncompiled bytes.
SerializedModule Serialize();
- static MaybeLocal<WasmCompiledModule> Deserialize(
- Isolate* isolate, const SerializedModule& serialized_data);
vogelheim 2016/10/06 10:00:50 This is an incompatible API change, and one of the
+
+ // If possible, deserialize the module, otherwise compile it from the provided
+ // uncompiled bytes.
+ static MaybeLocal<WasmCompiledModule> DeserializeOrCompile(
+ Isolate* isolate, const SerializedModule& serialized_data,
+ Local<String> uncompiled_bytes);
V8_INLINE static WasmCompiledModule* Cast(Value* obj);
private:
+ static MaybeLocal<WasmCompiledModule> Compile(Isolate* isolate,
+ Local<String> bytes);
WasmCompiledModule();
static void CheckCast(Value* obj);
};
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698