| Commit-Queue | +0 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM, thanks!
SameSitePrerenderReusesProcess) {Actually this test confirms the `same-origin` case. Can we also confirm the same-site cross-origin case?
// Use PrerenderHostRegistry to cancel.This comment may not be useful?
scoped_refptr<SiteInstanceImpl> site_instance;Do we need to split initialization from declaration? Can we keep the original structure?
```
scoped_refptr<SiteInstanceImpl> site_instance =
base::FeatureList::IsEnabled(kCreatePrerenderSiteInstanceWithURL)
? SiteInstanceImpl::CreateForURL(web_contents.GetBrowserContext(),
attributes.prerendering_url)
: SiteInstanceImpl::Create(web_contents.GetBrowserContext());
```
// TODO(https://crbug.com/524800804): Add the following restrictions:
// 1. Limit to prerender-until-script for now.
// 2. For moderate eagerness only
// 3. Disallow Target_hint = 'blank' to use the same process.
// 4. Disallow cross-site prerendering to reuse the process.These comments should be placed on the following if-condition, not on the initialization of `site_instance`?
```
// TODO(https://crbug.com/524800804): Add the following restrictions:
// 1. Limit to prerender-until-script for now.
// 2. For moderate eagerness only
// 3. Disallow Target_hint = 'blank' to use the same process.
// 4. Disallow cross-site prerendering to reuse the process.
if (!attributes.IsBrowserInitiated() &&
attributes.initiator_frame_token.has_value() &&
base::FeatureList::IsEnabled(
features::kPrerender2ReuseInitiatorProcess)) {
RenderFrameHostImpl* initiator_rfh = RenderFrameHostImpl::FromFrameToken(
attributes.initiator_process_id,
attributes.initiator_frame_token.value());
if (initiator_rfh) {
site_instance->ReuseExistingProcessIfPossible(
initiator_rfh->GetProcess());
}
}
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
Actually this test confirms the `same-origin` case. Can we also confirm the same-site cross-origin case?
oh indeed.. thinking of that, let me start with same-origin prerendering to minimize the security concern.
This comment may not be useful?
Done
Do we need to split initialization from declaration? Can we keep the original structure?
```
scoped_refptr<SiteInstanceImpl> site_instance =
base::FeatureList::IsEnabled(kCreatePrerenderSiteInstanceWithURL)
? SiteInstanceImpl::CreateForURL(web_contents.GetBrowserContext(),
attributes.prerendering_url)
: SiteInstanceImpl::Create(web_contents.GetBrowserContext());
```
Done.
// TODO(https://crbug.com/524800804): Add the following restrictions:
// 1. Limit to prerender-until-script for now.
// 2. For moderate eagerness only
// 3. Disallow Target_hint = 'blank' to use the same process.
// 4. Disallow cross-site prerendering to reuse the process.These comments should be placed on the following if-condition, not on the initialization of `site_instance`?
```
// TODO(https://crbug.com/524800804): Add the following restrictions:
// 1. Limit to prerender-until-script for now.
// 2. For moderate eagerness only
// 3. Disallow Target_hint = 'blank' to use the same process.
// 4. Disallow cross-site prerendering to reuse the process.
if (!attributes.IsBrowserInitiated() &&
attributes.initiator_frame_token.has_value() &&
base::FeatureList::IsEnabled(
features::kPrerender2ReuseInitiatorProcess)) {
RenderFrameHostImpl* initiator_rfh = RenderFrameHostImpl::FromFrameToken(
attributes.initiator_process_id,
attributes.initiator_frame_token.value());
if (initiator_rfh) {
site_instance->ReuseExistingProcessIfPossible(
initiator_rfh->GetProcess());
}
}
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
let me submit this cl for now. Taiyo-san, plmk if you have any concerns.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
5 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: content/browser/preloading/prerender/prerender_browsertest.cc
Insertions: 6, Deletions: 5.
The diff is too large to show. Please review the diff.
```
```
The name of the file: content/browser/preloading/prerender/prerender_host.cc
Insertions: 5, Deletions: 7.
The diff is too large to show. Please review the diff.
```
[prerender] Allow prerendering pages to reuse initiator's process
This CL adds the basic implementation to allow prerendering pages to
reuse the initiator page's renderer process, for saving resources and
speeding up prerendering pages.
The implementation is behind a feature flag.
And follow-up CLs will restrict this feature to be used for same-site
pus pages only.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |