Skip to content

Object.observe order of notification is incorrect #3671

Closed

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.

Activity

  1. added
    v8 engineIssues and PRs related to the V8 dependency.
    on Nov 5, 2015
  2. ChALkeR commented on Nov 5, 2015

    @ChALkeR
    Member

    сс @Fishrock123 for Object.observe. What's the current status?

  3. thefourtheye commented on Nov 5, 2015

    @thefourtheye
    Contributor

    As per this thread, the proposal will be withdrawn and v8 support will also be dropped by the end of the year.

    After much discussion with the parties involved, I plan to withdraw the Object.observe proposal from TC39 (where it currently sits at stage 2 in the ES spec process), and hope to remove support from V8 by the end of the year (the feature is used on 0.0169% of Chrome pageviews, according to chromestatus.com).

  4. ken107 commented on Nov 5, 2015

    @ken107
    Author

    Thank you for the link, looks like I better start looking into Harmony Proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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