DescriptionRefactor BeforeInstallPromptEvent to use ScriptPromiseProperty
This stops the event holding a ScriptPromise as a member, which may
lead to a memory leak. Instead, ScriptPromiseProperty members are held
as members in the event. A WebCallbacks subclass is used to store a
pointer to the necessary ScriptPromiseProperty in the associated event,
with the interface exposed to Chromium. When a banner event is resolved,
the WebCallbacks implementation in modules/app_banner looks up the
ScriptPromiseProperty and resolves its promise. This also makes
resolving the prompt promise simpler as well, as it occurs entirely in the
event.
This CL also removes the app-banner-event-prompt.html test from
LeakExpectations, and fixes some bugs in the test relating to promise
resolution.
BUG=504675
Committed: https://crrev.com/8a7809f1e7eef498eab9f99f15e53a876b0ae9be
git-svn-id: svn://svn.chromium.org/blink/trunk@199472 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Patch Set 1 #Patch Set 2 : Removing from leak expectations #Patch Set 3 : Refactoring implementation to use WebCallbacks #Patch Set 4 : GC fixes #Patch Set 5 : Alphabetising ScriptPromiseProperties #Patch Set 6 : Restoring missing semicolon in test #
Total comments: 10
Patch Set 7 : Addressing reviewer comments #Patch Set 8 : Reject all promises when event is manually created #
Total comments: 4
Patch Set 9 : Addressing reviewer feedback #Patch Set 10 : Replace typedef with using as per style guide #
Total comments: 12
Patch Set 11 : Addressing reviewer comments #
Total comments: 2
Patch Set 12 : Make prompt() return a new promise each call, and restore async callback registration. #Messages
Total messages: 33 (11 generated)
|