Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Issue 2521793003: Fix WebContentsDelegate::ShouldCreateWebContents implementations. (Closed)

Created:
4 years, 1 month ago by ncarter (slow)
Modified:
4 years ago
Reviewers:
Charlie Reis, brettw
CC:
chromium-reviews, romax+watch_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, nasko+codewatch_chromium.org, creis+watch_chromium.org, chili+watch_chromium.org, tburkard+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, jam, petewil+watch_chromium.org, gavinp+prer_chromium.org, darin-cc_chromium.org, oshima+watch_chromium.org, tfarina, chromium-apps-reviews_chromium.org, xjz+watch_chromium.org, dimich+watch_chromium.org, davemoore+watch_chromium.org, miu+watch_chromium.org, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix WebContentsDelegate::ShouldCreateWebContents implementations. The problem was that |route_id| is scoped to a particular child process, but the process was not being plumbed in correctly, resulting in a situation where we would create (1) a RenderFrameHost with a routing ID that might later be reused, and also, (2) a RenderFrameHost with a plumbed-in routing ID, but no corresponding extant RenderFrame in the child process. The solution involves plumbing in the actual SiteInstance, and only using |route_id| if we don't change to a different SiteInstance. BUG=627852 TBR=brettw@chromium.org Committed: https://crrev.com/f5e618c7175237cd27bfb6e94fd4fa066367e36a Cr-Commit-Position: refs/heads/master@{#434743}

Patch Set 1 #

Patch Set 2 : More refactor. #

Patch Set 3 : Fix unittest compile issue #

Patch Set 4 : Fix android compile. #

Total comments: 11

Patch Set 5 : Fix delegate comment. #

Patch Set 6 : Rename in MaybeCreateBackgroundContents #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -59 lines) Patch
M chrome/browser/android/document/document_web_contents_delegate.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/android/document/document_web_contents_delegate.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/first_run/drive_first_run_controller.cc View 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/offscreen_tab.h View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/tab_capture/offscreen_tab.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_contents.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 5 chunks +38 lines, -33 lines 0 comments Download
M components/offline_pages/content/background_loader/background_loader_contents.h View 1 chunk +3 lines, -1 line 0 comments Download
M components/offline_pages/content/background_loader/background_loader_contents.cc View 1 chunk +3 lines, -1 line 0 comments Download
M components/offline_pages/content/background_loader/background_loader_contents_unittest.cc View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 2 3 4 3 chunks +26 lines, -6 lines 0 comments Download
M content/public/browser/web_contents_delegate.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/extension_options/extension_options_guest.h View 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/extension_options/extension_options_guest.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/keyboard/content/keyboard_ui_content.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M ui/views/controls/webview/web_dialog_view.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/controls/webview/web_dialog_view.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (27 generated)
ncarter (slow)
4 years, 1 month ago (2016-11-21 23:33:04 UTC) #7
ncarter (slow)
Charlie, please take a look.
4 years ago (2016-11-22 23:34:34 UTC) #18
Charlie Reis
This makes a lot of sense-- thanks for finding these cases. LGTM. (For the speculative ...
4 years ago (2016-11-23 06:59:47 UTC) #19
ncarter (slow)
ptal https://codereview.chromium.org/2521793003/diff/60001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (left): https://codereview.chromium.org/2521793003/diff/60001/chrome/browser/ui/browser.cc#oldcode2530 chrome/browser/ui/browser.cc:2530: GURL opener_url = opener_web_contents->GetURL(); On 2016/11/23 06:59:48, Charlie ...
4 years ago (2016-11-24 00:00:05 UTC) #23
Charlie Reis
LGTM https://codereview.chromium.org/2521793003/diff/60001/content/public/browser/web_contents_delegate.h File content/public/browser/web_contents_delegate.h (right): https://codereview.chromium.org/2521793003/diff/60001/content/public/browser/web_contents_delegate.h#newcode296 content/public/browser/web_contents_delegate.h:296: // The embedder has to synchronously adopt |route_id| ...
4 years ago (2016-11-24 00:31:04 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2521793003/100001
4 years ago (2016-11-28 18:03:00 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-11-28 22:39:05 UTC) #33
commit-bot: I haz the power
4 years ago (2016-11-28 22:41:16 UTC) #35
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/f5e618c7175237cd27bfb6e94fd4fa066367e36a
Cr-Commit-Position: refs/heads/master@{#434743}

Powered by Google App Engine
This is Rietveld 408576698