• Daniel Nicoara's avatar
    cast: webview: Update default initialization · 816c828f
    Daniel Nicoara authored
    * aura::Window default property values return 0 as the default value if
      the property isn't defined. So we can't initialize the IDs to 0 by
      default otherwise we could get matches on un-initialized Webviews.
    * Register the WebviewWindowManager::Observer when the Webview is
      created since this is when we have the Webview to parent. If it
      happens that we get a parenting request without a valid Webview it
      will crash the browser process.
    
    Bug: b/132811925
    Test: Try to register Webview with ID=0
    Change-Id: Ieb82c97be3850633b02894cb2a805272d38d227e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827582Reviewed-by: default avatarAlex Sakhartchouk <alexst@chromium.org>
    Commit-Queue: Daniel Nicoara <dnicoara@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#700293}
    816c828f
webview_grpc_service.cc 9.31 KB