New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 654652 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Long OOO (go/where-is-mgiuca)
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

BeforeInstallPromptEvent.idl: userChoice has the wrong return type

Project Member Reported by mgiuca@chromium.org, Oct 11 2016

Issue description

In third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.idl, the userChoice method is defined as:

  readonly attribute Promise<DOMString> userChoice;

It looks like from our sample code [1] the result type is actually an AppBannerPromptResult. I suspect this hasn't been picked up by our compiler because it actually ignores the promise types and those just serve as documentation.

[1] https://github.com/benfredwells/killer-marmot/blob/gh-pages/web/index.js
 

Comment 1 by mgiuca@chromium.org, Oct 11 2016

third_party/WebKit/Source/modules/app_banner/AppBannerCallbacks.cpp is where the promise is resolved, as you can see, with an AppBannerPromptResult, so this is just mis-documented in the IDL file.
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10e4a80deab7c68f449c79ddb3e4dbe8d5b6e20c

commit 10e4a80deab7c68f449c79ddb3e4dbe8d5b6e20c
Author: mgiuca <mgiuca@chromium.org>
Date: Fri Oct 14 19:54:27 2016

BeforeInstallPromptEvent.idl: userChoice returns AppBannerPromptResult.

Previously this was specified as returning a DOMString, which is
incorrect.

BUG= 654652 

Review-Url: https://codereview.chromium.org/2403413002
Cr-Commit-Position: refs/heads/master@{#425441}

[modify] https://crrev.com/10e4a80deab7c68f449c79ddb3e4dbe8d5b6e20c/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.idl

Components: UI>Browser>WebAppInstalls
Status: Fixed (was: Started)
I'm assuming this is fixed now, please reopen if incorrect.

Sign in to add a comment