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

Issue 2739193004: Check for already existing entry when adding to SiteProcessMap. (Closed)

Created:
3 years, 9 months ago by nasko
Modified:
3 years, 9 months ago
Reviewers:
Charlie Reis, Devlin
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Check for already existing entry when adding to SiteProcessMap. The SiteProcessMap::RegisterProcess can overwrite existing entries in the map, which can lead to incorrect process being mapped to a site in process-per-site mode. This CL checks for existence and avoids the overwrite. BUG=700514 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2739193004 Cr-Commit-Position: refs/heads/master@{#456920} Committed: https://chromium.googlesource.com/chromium/src/+/0e9d619f88ffabc3c237cbdf75603df8af9925e6

Patch Set 1 #

Patch Set 2 : Check for value equality if key exists. #

Patch Set 3 : Fix. #

Total comments: 19

Patch Set 4 : Remove the CHECK for now, will add in separate CL. #

Patch Set 5 : Fixes based on Devlin's review. #

Total comments: 6

Patch Set 6 : More fixes based on reviews. #

Total comments: 8

Patch Set 7 : Add extra comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -6 lines) Patch
M chrome/browser/extensions/process_management_browsertest.cc View 1 2 3 4 5 6 2 chunks +68 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/web_request_site_process_registration/blocked.html View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/web_request_site_process_registration/manifest.json View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/web_request_site_process_registration/test.html View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/web_request_site_process_registration/test.js View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 1 chunk +5 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 54 (40 generated)
nasko
Fix.
3 years, 9 months ago (2017-03-11 00:25:12 UTC) #9
nasko
Hey Charlie and Devlin, Can you review this CL for me? Devlin, the extension I ...
3 years, 9 months ago (2017-03-11 01:09:38 UTC) #14
Devlin
Thanks for tracking this down!! :) https://codereview.chromium.org/2739193004/diff/40001/chrome/browser/extensions/process_management_browsertest.cc File chrome/browser/extensions/process_management_browsertest.cc (right): https://codereview.chromium.org/2739193004/diff/40001/chrome/browser/extensions/process_management_browsertest.cc#newcode404 chrome/browser/extensions/process_management_browsertest.cc:404: // Load an ...
3 years, 9 months ago (2017-03-11 01:52:18 UTC) #17
nasko
Devlin, can you take another look? I've fixed all of the review comments. https://codereview.chromium.org/2739193004/diff/40001/chrome/browser/extensions/process_management_browsertest.cc File ...
3 years, 9 months ago (2017-03-13 17:22:03 UTC) #26
Devlin
lgtm https://codereview.chromium.org/2739193004/diff/40001/chrome/test/data/extensions/web_request_blocking/manifest.json File chrome/test/data/extensions/web_request_blocking/manifest.json (right): https://codereview.chromium.org/2739193004/diff/40001/chrome/test/data/extensions/web_request_blocking/manifest.json#newcode6 chrome/test/data/extensions/web_request_blocking/manifest.json:6: "permissions": ["webRequest", "webRequestBlocking", "tabs", "<all_urls>"], On 2017/03/13 17:22:03, ...
3 years, 9 months ago (2017-03-13 19:19:56 UTC) #31
Charlie Reis
Hmm, I have a concern about this fix below. (Overall, very nice investigation and test!) ...
3 years, 9 months ago (2017-03-13 19:57:30 UTC) #32
nasko
https://codereview.chromium.org/2739193004/diff/100001/chrome/browser/extensions/process_management_browsertest.cc File chrome/browser/extensions/process_management_browsertest.cc (right): https://codereview.chromium.org/2739193004/diff/100001/chrome/browser/extensions/process_management_browsertest.cc#newcode406 chrome/browser/extensions/process_management_browsertest.cc:406: LoadExtension(test_data_dir_.AppendASCII("web_request_blocking")); On 2017/03/13 19:19:56, Devlin wrote: > nit: can ...
3 years, 9 months ago (2017-03-13 21:06:19 UTC) #35
Charlie Reis
Thanks! I think it's almost ready, depending on whether there are concrete problems in the ...
3 years, 9 months ago (2017-03-13 22:31:33 UTC) #38
nasko
https://codereview.chromium.org/2739193004/diff/140001/chrome/browser/extensions/process_management_browsertest.cc File chrome/browser/extensions/process_management_browsertest.cc (right): https://codereview.chromium.org/2739193004/diff/140001/chrome/browser/extensions/process_management_browsertest.cc#newcode446 chrome/browser/extensions/process_management_browsertest.cc:446: // Very subtle check for content/ internal functionality :(. ...
3 years, 9 months ago (2017-03-14 16:56:02 UTC) #41
Charlie Reis
Thanks. LGTM if the case below isn't problematic. https://codereview.chromium.org/2739193004/diff/140001/chrome/browser/extensions/process_management_browsertest.cc File chrome/browser/extensions/process_management_browsertest.cc (right): https://codereview.chromium.org/2739193004/diff/140001/chrome/browser/extensions/process_management_browsertest.cc#newcode446 chrome/browser/extensions/process_management_browsertest.cc:446: // ...
3 years, 9 months ago (2017-03-14 23:46:47 UTC) #44
nasko
https://codereview.chromium.org/2739193004/diff/140001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/2739193004/diff/140001/content/browser/frame_host/navigator_impl.cc#newcode629 content/browser/frame_host/navigator_impl.cc:629: // error page. In that case, the SiteInstance can ...
3 years, 9 months ago (2017-03-15 00:32:06 UTC) #47
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/2739193004/160001
3 years, 9 months ago (2017-03-15 00:33:40 UTC) #50
commit-bot: I haz the power
Committed patchset #7 (id:160001) as https://chromium.googlesource.com/chromium/src/+/0e9d619f88ffabc3c237cbdf75603df8af9925e6
3 years, 9 months ago (2017-03-15 00:43:47 UTC) #53
tzik
3 years, 9 months ago (2017-03-15 06:12:25 UTC) #54
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:160001) has been created in
https://codereview.chromium.org/2749543004/ by tzik@chromium.org.

The reason for reverting is: Speculative revert to see a bot failure.

SubresourceFilterBrowserTest.FailedProvisionalLoadInMainframe got flaky around
this CL, and this is relatively more suspicious in the failing range.

BUG=701663.

Powered by Google App Engine
This is Rietveld 408576698