Skip to content

Consider removing call to named property setter in legacy platform object [[Set]] #630

Open
@Ms2ger

Description

@Ms2ger

Test:

<!DOCTYPE html>
<script>
sessionStorage.clear()
var a = new Proxy(Object.getPrototypeOf(sessionStorage), {
  set(...args) { w(args); return false; },
});
Object.setPrototypeOf(sessionStorage, a);
sessionStorage.x = "foo";
w(sessionStorage.x)
</script>

Gecko and Chrome call proto.[[Set]]() rather than taking the early return, as shown by the log:

log: object "[object Storage],x,foo,[object Storage]" (4 props: 0="[object Storage]", 1="x", 2="foo", 3="[object Storage]")
log: undefined

but WebKit may be following the spec:

log: foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions