• Devlin Cronin's avatar
    [Extensions] Enforce a maximum message size limit · a31644c6
    Devlin Cronin authored
    Enforce a maximum message limit for extensions of a 64MB string (from
    the JSON-ified object passed to the API call). We enforce a 128 MB limit
    on IPC messages, but even that should be excessively large for our needs.
    Also add metrics to see what average messages look like - 64MB is *huge*
    (and we have to serialize/deserialize the object multiple times, so
    message size can have a pretty big performance impact), so we may be
    able to reduce this furter.
    
    Add a test for the new behavior.
    
    Bug: 766713
    
    Change-Id: Ic72b2c6c3ea3ca68a42fcd8061c9e006bc6f1795
    Reviewed-on: https://chromium-review.googlesource.com/688674Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
    Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
    Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#505176}
    a31644c6
extension_messages_apitest.cc 55.5 KB