Not sure if this is a bug or if I am missing something :
If I try to dimension a canvas greater than 11180 X 11180 operations fail. It works in Chrome.
According to MDN, limit should be 22,528 x 20,992
Please view this fiddle for an example :
https://jsfiddle.net/mahks/0k6htpxv/3/
The left canvas works, the right does not. If you reduce the variable s by 100 (11000) then both work in Firefox.