LEBDecoder and Wasm::Parser should be tolerant for not enough data
Created attachment 347632 [details] Patch
Attachment 347632 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/wasm/WasmParser.h:237: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 347632 [details] Patch Seems like we’re doing this at such a low level. Why can’t we wait until we have enough bytes for the module header then just know when we can individually parse functions at their byte boundaries?
(In reply to Saam Barati from comment #3) > Comment on attachment 347632 [details] > Patch > > Seems like we’re doing this at such a low level. Why can’t we wait until we > have enough bytes for the module header then just know when we can > individually parse functions at their byte boundaries? Make sense. After reading Wasm module specification carefully, we do not need to have such a low level tolerance in LEBDecoder etc. Closing this issue. Without it, we can construct streaming decoder for wasm.