• Hui Yingst's avatar
    Avoid storing pending requests in OpenPDFParamsParser. · 8a4cf1cb
    Hui Yingst authored
    OpenPDFParamsParser currently maintains an array of requests and assumes
    they will get replied in the same order. By changing the return type of
    getNamedDestinationCallback() to a promise, this CL enables
    getViewportFromUrlParams() to handle the data returned by the plugin
    directly, without storing all the requests inside OpenPDFParamsParser.
    
    This CL also removes the usage of onNamedDestinationReceived() from
    browser tests.
    
    Bug: 55776,535978,748852
    Change-Id: If6e8285a363d2efee169457856ca465cb498805a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391102
    Commit-Queue: Hui Yingst <nigi@chromium.org>
    Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#809449}
    8a4cf1cb
constants.js 1.02 KB