Commit 6d30df1a authored by Bill Budge's avatar Bill Budge Committed by Commit Bot

[bindings][wasm][code cache] Don't cache if v8 can't serialize

- Adds a check that V8 did serialize the Wasm Module when receiving the
  OnModuleCompiled callback.

Bug: chromium:1126862
Change-Id: Ie329372b14785a3975f5f8dce5f9ef49b74ec95c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406589Reviewed-by: default avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811728}
parent df869b61
......@@ -252,6 +252,10 @@ class WasmStreamingClient : public v8::WasmStreaming::Client {
return;
v8::OwnedBuffer serialized_module = compiled_module.Serialize();
// V8 might not be able to serialize the module.
if (serialized_module.size == 0)
return;
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"),
"v8.wasm.cachedModule", TRACE_EVENT_SCOPE_THREAD,
"producedCacheSize", serialized_module.size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment