`new CanvasGradient()` causes a hard crash
hamish-milne opened this issue · comments
Hamish Milne commented
Repro: new CanvasGradient()
Expected output:
Uncaught TypeError: Illegal constructor
at <anonymous>:1:1
Actual output: crash, Assertion failed on ..\src\js_api_canvas.cc:1961: false
Joao da Silva commented
Confirmed, consistent crash.
CanvasGradient is a funny API. The objects must be created via canvas.createLinearGradient and canvas.createRadialGradient, but the constructor also exists, yet it throws TypeError if used. Window.js should throw too, instead of crashing.