The resolver function of BeforeInstallPromptEvent.userChoice() is not called after GC. |
||
Issue descriptionAccording to the issue 517398 , currently the ScriptPromiseProperty doesn't holds the strong resolver references. So the resolver function could be GCed while waiting for the response from the server. The holder of the ScriptPromiseProperty must be kept alive until the promise is resolved. There is a tests for this bug https://codereview.chromium.org/2919233002/. I found this bug while inspecting the issue 728013 . I think BeforeInstallPromptEvent must implement ScriptWrappable::HasPendingActivity() like https://codereview.chromium.org/2922863002.
,
Jun 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d19c3febaffe87341f915bca1fdae0be282ac9ed commit d19c3febaffe87341f915bca1fdae0be282ac9ed Author: Mounir Lamouri <mlamouri@chromium.org> Date: Wed Jun 07 09:16:12 2017 Wait for BeforeInstallPromptEvent.userChoice() to be resolved before GC'ing object. Bug: 729902 Change-Id: I7813e944c4e43daea908243899a59339115367a7 Reviewed-on: https://chromium-review.googlesource.com/525575 Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Mounir Lamouri <mlamouri@chromium.org> Cr-Commit-Position: refs/heads/master@{#477590} [add] https://crrev.com/d19c3febaffe87341f915bca1fdae0be282ac9ed/third_party/WebKit/LayoutTests/app_banner/app-banner-event-gc.html [modify] https://crrev.com/d19c3febaffe87341f915bca1fdae0be282ac9ed/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp [modify] https://crrev.com/d19c3febaffe87341f915bca1fdae0be282ac9ed/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.h [modify] https://crrev.com/d19c3febaffe87341f915bca1fdae0be282ac9ed/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.idl
,
Jun 7 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by mlamouri@chromium.org
, Jun 6 2017