Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid creating a vector when constructing Dart typed data objects for platform messages #18838

Merged
merged 1 commit into from
Jun 18, 2020

Commits on Jun 4, 2020

  1. Avoid creating a vector when constructing Dart typed data objects for…

    … platform messages
    
    PlatformMessageResponseDart creates an external typed data object to
    hold the contents of large platform messages such as loaded assets.
    The implementation was using a std::vector to hold the message data
    extracted from an fml::Mapping.  The vector is initialized during
    construction, which is unnecessary given that the data will be
    immediately overwritten.
    
    This change centralizes creation of these typed data objects into
    Tonic's DartByteData::Create.  DartByteData::Create will allocate an
    external typed data based on a malloc buffer if the size exceeds a
    threshold.
    
    Fixes flutter/flutter#58572
    jason-simmons committed Jun 4, 2020
    Configuration menu
    Copy the full SHA
    fa36e51 View commit details
    Browse the repository at this point in the history