Changeset 216598 in webkit


Ignore:
Timestamp:
May 10, 2017 11:22:31 AM (7 years ago)
Author:
jfbastien@apple.com
Message:

WebAssemby: builder doesn't do Memory section maximum correctly
https://bugs.webkit.org/show_bug.cgi?id=171931

Reviewed by Keith Miller.

  • wasm/Builder.js:

(export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Memory):

  • wasm/function-tests/memory-grow-invalid.js: Added.
Location:
trunk/JSTests
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r216597 r216598  
     12017-05-10  JF Bastien  <jfbastien@apple.com>
     2
     3        WebAssemby: builder doesn't do Memory section maximum correctly
     4        https://bugs.webkit.org/show_bug.cgi?id=171931
     5
     6        Reviewed by Keith Miller.
     7
     8        * wasm/Builder.js:
     9        (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
     10        * wasm/Builder_WebAssemblyBinary.js:
     11        (const.emitters.Memory):
     12        * wasm/function-tests/memory-grow-invalid.js: Added.
     13
    1142017-05-10  JF Bastien  <jfbastien@apple.com>
    215
  • trunk/JSTests/wasm/Builder.js

    r215340 r216598  
    518518                    const memoryBuilder = {
    519519                        End: () => this,
    520                         InitialMaxPages: (initial, max) => {
    521                             s.data.push({ initial, max });
     520                        InitialMaxPages: (initial, maximum) => {
     521                            s.data.push({ initial, maximum });
    522522                            return _errorHandlingProxyFor(memoryBuilder);
    523523                        }
  • trunk/JSTests/wasm/Builder_WebAssemblyBinary.js

    r213465 r216598  
    155155        // Flags, currently can only be [0,1]
    156156        put(bin, "varuint1", section.data.length);
    157         for (const memory of section.data) {
    158             put(bin, "varuint32", memory.max ? 1 : 0);
    159             put(bin, "varuint32", memory.initial);
    160             if (memory.max)
    161                 put(bin, "varuint32", memory.max);
    162         }
     157        for (const memory of section.data)
     158            putResizableLimits(bin, memory.initial, memory.maximum);
    163159    },
    164160
Note: See TracChangeset for help on using the changeset viewer.