Skip to content

Commit

Permalink
Throw TypeError for shared memory w/o maximum (#154)
Browse files Browse the repository at this point in the history
Instead of RangeError.

Fixes #153.
  • Loading branch information
binji committed Mar 26, 2020
1 parent 5068026 commit 980c1bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ which can be simultaneously referenced by multiple {{Instance}} objects. Each
1. If |descriptor|["maximum"] is [=present=], let |maximum| be |descriptor|["maximum"]; otherwise, let |maximum| be empty.
1. If |maximum| is not empty and |maximum| < |initial|, throw a {{RangeError}} exception.
1. Let |shared| be |descriptor|["shared"].
1. If |shared| is true and |maximum| is empty, throw a {{RangeError}} exception.
1. If |shared| is true and |maximum| is empty, throw a {{TypeError}} exception.
1. Let |memtype| be { min |initial|, max |maximum|, shared |shared| }
1. Let |store| be the [=surrounding agent=]'s [=associated store=].
1. Let (|store|, |memaddr|) be [=mem_alloc=](|store|, |memtype|). If allocation fails, throw a {{RangeError}} exception.
Expand Down

0 comments on commit 980c1bc

Please sign in to comment.