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

Issue 764607 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocked on:
issue 764626

Blocking:
issue 740783



Sign in to add a comment

desktop-pwas: Clicking on noopener links for in-scope URLs opens an app window in the background

Project Member Reported by ortuno@chromium.org, Sep 13 2017

Issue description


1. Install Docs PWA
2. Click on a target="_blank" rel="noopener" link.

Expected result:
Docs PWA should open in the foreground

Actual result:
Docs PWA opens in the background

There is a race condition where the app window opens and focuses and then the newly opened tab focuses.
 

Comment 1 by ortuno@chromium.org, Sep 13 2017

Blockedon: 764626
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 12 2017

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

commit f2bd12747d263b209a389fdca4470aa6052a9edd
Author: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Date: Thu Oct 12 03:16:12 2017

desktop-pwas: Post task to open the app and another one to close the tab

When a new WebContents has no opener, the first navigation will happen
synchronously. This could result in us opening the app and then focusing
the original WebContents. To avoid this we post a task to open the app.

According to NavigationThrottle::WillStartRequest's documentation closing
a WebContents should be done asynchronously to avoid UAFs.

Bug:  753238 ,  764607 
Change-Id: Ib0a62a33dff78cae7a0a90f19db77becacc8aeb9
Reviewed-on: https://chromium-review.googlesource.com/691635
Reviewed-by: Ben Wells <benwells@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508240}
[modify] https://crrev.com/f2bd12747d263b209a389fdca4470aa6052a9edd/chrome/browser/extensions/bookmark_app_navigation_throttle.cc
[modify] https://crrev.com/f2bd12747d263b209a389fdca4470aa6052a9edd/chrome/browser/extensions/bookmark_app_navigation_throttle.h
[modify] https://crrev.com/f2bd12747d263b209a389fdca4470aa6052a9edd/chrome/browser/extensions/bookmark_app_navigation_throttle_browsertest.cc

Comment 3 by ortuno@chromium.org, Nov 21 2017

Status: Fixed (was: Assigned)

Sign in to add a comment