Skip to content

Object.observe order of notification is incorrect #3671

Closed
@ken107

Description

@ken107
o = {a:0};
p = {b:0};
Object.observe(o, function(c) {console.log(c)});
Object.observe(p, function(c) {console.log(c)});
p.b++; o.a++;

This prints out:

[ { type: 'update', object: { a: 1 }, name: 'a', oldValue: 0 } ]
[ { type: 'update', object: { b: 1 }, name: 'b', oldValue: 0 } ]

If I pass the same function instance to both calls to Object.observe, then the order comes out correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions