Version: 56
OS: Android
What steps will reproduce the problem?
(1) Set up a PWA site with a service worker, manifest, etc.
(2) Use attached index.js.
(3) Visit site.
The code that runs during load is:
var e = new BeforeInstallPromptEvent({});
e.preventDefault();
window.setTimeout(() => {
e.prompt()
.then(() => console.log('prompt() succeeded'))
.catch(e => console.error('prompt() failed: ' + e));
}, 1000);
What is the expected output?
preventDefault has no effect.
After 1 second, console error: "prompt() failed: InvalidStateError ..."
What do you see instead?
Renderer crashes on the call to preventDefault.
10-14 13:52:58.130 11123 11241 F chromium: [FATAL:embedded_worker_registry.cc(260)] Check failed: base::ContainsKey(process_sender_map_, process_id).
Note: I put in the call to prompt() to illustrate a potential problem after the crash is fixed: that the site is able to trigger a prompt without having received a legitimate beforeinstallprompt event from the UA. This should be prevented, regardless of whether preventDefault has been called on the event.
|
Deleted:
index.js
365 bytes
|
Comment 1 by mmoroz@chromium.org
, Oct 14 2016