• Mohamed Heikal's avatar
    [Resources] Only rewrite non-system resource IDs for webview · 280aa846
    Mohamed Heikal authored
    In monochrome webview mode onResourceLoaded currently rewrites all
    resource ids inside resource arrays including system resource IDs. This
    is a bug.
    
    The first try to fix the bug (cl/952097) caused a performance regression
    in webview startup so this is a different idea to fixing the same bug
    that should hopefully not suffer from the same performance regression as
    the previous.
    
    Since resource IDs are sorted (so system resources are at the beginning
    of the array).  This CL finds the index of the first non-system resource
    ID and starts rewriting at that point.
    
    NOTRY=true #win7_chromium_rel_ng extremely flakey
    
    Bug: 821425
    Change-Id: I9f6f3c517a8c09cbbefb9b584ab6f5bfc9c8477b
    Reviewed-on: https://chromium-review.googlesource.com/999003
    Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
    Reviewed-by: default avataragrieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#549267}
    280aa846
resource_utils.py 17.8 KB