Commit 95c2fa65 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[piexwasm] Include the image size in the malloc() failure Error

Bug: 935285
Change-Id: Id2810b266440a339f5dbbe7fd9f3814f5e24ad23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616838Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661255}
parent 2c2f49c8
...@@ -514,7 +514,7 @@ class ImageBuffer { ...@@ -514,7 +514,7 @@ class ImageBuffer {
process() { process() {
this.memory = Module._malloc(this.length); this.memory = Module._malloc(this.length);
if (!this.memory) { if (!this.memory) {
throw new Error('Image malloc failure'); throw new Error('Image malloc failed: ' + this.length + ' bytes');
} }
Module.HEAP8.set(this.source, this.memory); Module.HEAP8.set(this.source, this.memory);
......
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