Skip to content

Commit d0d20cc

Browse files
committed
wasm: Allow badvalue in the get_tracked spec
A hook that violates its contract makes the whole call return the bare atom, which the edoc describes and the tests pin, but the spec promised a list. Say so until that return becomes an exception.
1 parent bf08de9 commit d0d20cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libs/avm_emscripten/src/emscripten.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ run_script_tracked(_Script) ->
396396
%% `{error, badkey}' / `{error, badvalue}' tuples
397397
-spec get_tracked
398398
(_TrackedObjects :: [tracked_object(), ...], key) -> [non_neg_integer()];
399-
(_TrackedObjects :: [tracked_object(), ...], value) -> [get_tracked_result()].
399+
(_TrackedObjects :: [tracked_object(), ...], value) -> [get_tracked_result()] | badvalue.
400400
get_tracked(_TrackedObjects, _Type) ->
401401
erlang:nif_error(undefined).
402402

0 commit comments

Comments
 (0)