Skip to content

Move to the new RTI #1789

Description

@DaveShuckerow

To fix #1610, we had to turn off Dart's new RTI implementation in our release builds.

Our dependency, plotly.js, uses a recursive walk of both object symbols and object.keys as part of the drawing process.

The old RTI is deprecated and will be deleted soon.

CC @rakudrama

The JS code we're running into this difficulty interopping with is detailed at this comment:
#1610 (comment)

Activity

  1. rakudrama commented on Apr 3, 2020

    @rakudrama

    The code uses Object.keys.

       ...
       var keys = Object.keys(container);
       ...
    

    Can we verify that Object.keys has the original value?
    It should print in the console as
    function keys() { [native code] }
    or
    f keys() { [native code] }

  2. rakudrama commented on Apr 3, 2020

    @rakudrama

    I have two working hypotheses:

    • Object.keys is overwritten or somehow behaving differently
    • The initial value passed to plotly.js is a Dart object, or contains a Dart object other than an Array.
      What is the value passed in just before the recursion?
  3. DaveShuckerow commented on Apr 3, 2020

    @DaveShuckerow
    ContributorAuthor

    We saw that Object.keys appears to be implemented the same:

    image

    I will look into configuring a debug environment I can share for inspecting the dart objects getting cleaned.

  4. DaveShuckerow commented on Apr 3, 2020

    @DaveShuckerow
    ContributorAuthor

    From a pair debugging session, it looks like we're passing Null instead of null (the Null type instead of the absence of an object) to Plotly. This is fixable with a 4-line change on our end.

  5. added this to the M17 milestone on Apr 6, 2020
  6. jacob314 commented on Apr 6, 2020

    @jacob314
    Contributor

    Looks like this was fixed by https://github.com/flutter/devtools/pull/1791/files but not closed.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions