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

Issue 677501 link

Starred by 2 users

Issue metadata

Status: Fixed
Merged: issue 677500
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Chrome Version 55 update screws up content.js and background.js communication sequence for an extension

Reported by ku...@whatfix.com, Dec 29 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

Steps to reproduce the problem:
1. Extract the zip file
2. Add the sample extension to chrome
3. Host the step1.html and step2.html on a simple HTTP server.
4. Open step1.html in browser.
5. Open the background page console for sample extension
6. Click on button Step1. It will open Step2.html
7. In Step2.html, click on button. It will open Step1.html again.

What is the expected behavior?
Console should have printed as below:
===========================================================
Tab: 4513 Step 1 event fired!
Tab: 4513 Before Unload event fired!
Tab:  Step 2 event fired!
Tab: 4513 Before Unload event fired!

What went wrong?
Console instead prints the below:
===========================================================
Tab: 4513 Before Unload event fired!
Tab: 4513 Step 1 event fired!
Tab: 4513 Before Unload event fired!
Tab:  Step 2 event fired!
===========================================================
Note that the beforeload event is getting fired before honoring the window.postMessage() on respective page!

Did this work before? Yes 54

Does this work in other browsers? Yes

Chrome version: 55.0.2883.75  Channel: stable
OS Version: Ubuntu 14.04
Flash Version: Shockwave Flash 24.0 r0

We believe that this issue is a regression because of the fix given for https://bugs.chromium.org/p/chromium/issues/detail?id=660706 issue.
 
chrome_55_incorrect_order_issue.zip
7.0 KB Download
Components: Platform>Extensions Blink>DOM>Events
Labels: -Hotlist-Interop

Comment 2 by hdodda@chromium.org, Dec 30 2016

Mergedinto: 677500
Status: Duplicate (was: Unconfirmed)
Duping this issue into #677500 .

Comment 3 by hdodda@chromium.org, Dec 30 2016

Status: Unconfirmed (was: Duplicate)
Labels: Needs-Bisect Needs-Triage-M55
Cc: rdevlin....@chromium.org brajkumar@chromium.org
Status: Untriaged (was: Unconfirmed)
Tested this issue on Windows-10 and Ubuntu 14.04 by following steps mentioned below.

1. Unpacked the zipped folder
2. Added the sample extension to chrome
3. Placed step1 and step2 html in a separate folder
4. Opened the background page console from sample extension
5. Opened step1.html in browser.
6. Clicked on button Step1 and observed it opened Step2.html 
7. In Step2.html, clicked on button and observed it open Step1.html.

I have performed the above steps on chrome M54-54.0.2823.0 and observed the console prints different message as shown in the below screen shot.

Note: Adding @rdevlin.cronin for more updates as per original comment.

rdevlin.cronin@ - Could you please take a look in to it? 
677501.PNG
164 KB View Download
Cc: -rdevlin....@chromium.org
Owner: rdevlin....@chromium.org
Status: Assigned (was: Untriaged)
Status: Fixed (was: Assigned)
Thanks for the report!

You're right; this happened because of  issue 660706 .  In order to allow posting messages in the unload handler, we had to make passing those messages synchronous, which had the impact of potentially making those messages faster than ones that were sent immediately before the page started unloading.  (For fun history, we the reason we made the other messages async was to prevent an extension message from slowing down an entire renderer during e.g. page load.)

This should all already be fixed in M57, with revision 8e744a465d70e2ab1bf7959a66c3c65bd3850092.  I've tried it locally, and it works as expected.  Can you double-check that this is fixed in M57?

Comment 9 by ku...@whatfix.com, Jan 11 2017

Thanks for the reply. I have tested in M57 and the issue is resolved. I will run some more tests and revert if anything comes up. For now it looks good. Appreciate your effort
Labels: -Needs-Bisect -Needs-Triage-M55
Glad it's resolved, and thanks for the report!

Comment 11 by tkent@chromium.org, Mar 15 2017

Components: -Blink>DOM>Events Blink>DOM
Remove Blink>DOM>Events

Sign in to add a comment