Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tracked down the reason why FDQ in Firefox doesn't work in certain cases where it does in Chrome, such as for puzzles 2 and 3 in the sudoku example. The reason was a bug in the
ArrayBufferTransferPoly
polyfill indsl2ml.js
, which in certain cases clobbers data in Firefox.The first commit fixes that issue by copy & pasting the fixed implementation from the same place you copied the original. It looks like someone else noticed the bug in the MDN implementation and published the fix sometime after you grabbed it.
While I was debugging that issue, I noticed
compileJump
doesn't need to callgrow
here when the jump doesn't go past the end ofmlBuffer
. And in fact, thiscompileJump
invocation (and supporting comments) doesn't(/don't) make sense ifcompileJump
always allocates more memory unconditionally, as it currently does.The second commit adds a check before
compileJump
callsgrow
so it only callsgrow
when necessary (and when it does callgrow
, it only over-provisions by 10%, instead of 100% like it does now).