Possible page script to content script race condition on CustomEvent dispatch
Reported by
robotic1...@googlemail.com,
May 20 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 Steps to reproduce the problem: 1. load attached buggyExt.zip extension 2. enable extension access to file:// URLs 3. navigate to attached bugtest.html 4. open the developer console 5. reload page several times and observe assertion errors in console What is the expected behavior? Console should only display: "Testcount (broken/working/total): 488 / 512 / 1000" while broken and working count is determined randomly (see bugtest.html) What went wrong? The assertions in version 1 of the event handler should never fail like in version 2. But unfortunately they do. In fact they seem to fail randomly, indicating some form of race condition. This ONLY happens if: 1. the event was dispatched from a normal (or injected) page script. If the event was dispatched from within the content script, everything works as expected. 2. AND The closure accessing the event.detail is called trough any type of asynchronous API callback. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 58.0.3029.81 Channel: n/a OS Version: Arch Linux 4.9.24-1-lts Flash Version: Shockwave Flash 22.0 r0 tested with the following APIs: window.setTimeout (longer timeouts seem to increase failure rate) chrome.storage.local.get
,
Jul 13 2017
Tested on latest Chrome stable #59.0.3071.115 on Ubuntu 14.04 and able to reproduce the issue. Attached the screenshot for reference. This is a non-regression issue and able to reproduce from M-56 #56.0.2884.0.Marking it as untriaged so that issue gets addressed. Observations: 1. In Ubuntu 14.04, for the builds before 56.0.2884.0, upon loading the extension an alert “Manifest file is missing or unreadable.” is noticed. 2. In Mac 10.12.5 and Windows 10 even for the latest stable version #59.0.3071.115, upon loading the extension an alert “Manifest file is missing or unreadable.” is noticed Thanks in advance. |
||
►
Sign in to add a comment |
||
Comment 1 by skyos...@chromium.org
, May 22 2017