Change type of error thrown by bad ImageData initialization
From: https://html.spec.whatwg.org/multipage/canvas.html: """ When the ImageData() constructor is invoked with its first argument being an Uint8ClampedArray source and its second and optional third arguments being numeric arguments sw and sh, it must run these steps: 1. Let length be the number of bytes in source. 2. If length is not a nonzero integral multiple of four, then throw an "InvalidStateError" DOMException. """ Previously we were throwing an IndexSizeError. Change the error type to match the spec. Bug: 934838 Change-Id: Id122dcbae49426c3c10bf690f8bf940bbf481fc7 Reviewed-on: https://chromium-review.googlesource.com/c/1495195 Commit-Queue: Aaron Krajeski <aaronhk@chromium.org> Reviewed-by:Fernando Serboncini <fserb@chromium.org> Cr-Commit-Position: refs/heads/master@{#636613}
Showing
Please register or sign in to comment