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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1886413002: Always swap with a replacement proxy in OnSwapOut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 base::IntToString(routing_id)); 1603 base::IntToString(routing_id));
1604 base::debug::SetCrashKeyValue("swapout_proxy_id", 1604 base::debug::SetCrashKeyValue("swapout_proxy_id",
1605 base::IntToString(proxy->routing_id())); 1605 base::IntToString(proxy->routing_id()));
1606 base::debug::SetCrashKeyValue( 1606 base::debug::SetCrashKeyValue(
1607 "swapout_view_id", base::IntToString(render_view->GetRoutingID())); 1607 "swapout_view_id", base::IntToString(render_view->GetRoutingID()));
1608 CHECK(!render_view->main_render_frame_); 1608 CHECK(!render_view->main_render_frame_);
1609 } 1609 }
1610 1610
1611 if (is_loading) 1611 if (is_loading)
1612 proxy->OnDidStartLoading(); 1612 proxy->OnDidStartLoading();
1613 } else if (!is_main_frame) {
alexmos 2016/04/15 17:05:12 I initially tried to do this for all frames for co
Charlie Reis 2016/04/15 23:20:05 On one hand, there are 400 references to WebView::
alexmos 2016/04/22 05:09:34 Agree with all your concerns, so I'm super-happy t
1614 // If there is no proxy, this is the last active frame in this
1615 // SiteInstance, and its WebWidget and RenderView will be closed
1616 // shortly afterward. The closing of RenderView would eventually detach
1617 // this frame along with any other frames in the frame tree, but if this is
1618 // a subframe, delete it right away to prevent it from being used after its
1619 // WebFrameWidget has been cleared. See https://crbug.com/568836#15 for
1620 // details.
1621 OnDeleteFrame();
Charlie Reis 2016/04/15 23:20:05 I'm assuming that using OnDeleteFrame() rather tha
nasko 2016/04/18 21:24:26 This method is called by the browser, so in a sens
alexmos 2016/04/22 05:09:34 Likewise, this concern is gone in the latest PS. :
1613 } 1622 }
1614 1623
1615 // Initialize the WebRemoteFrame with the replication state passed by the 1624 // Initialize the WebRemoteFrame with the replication state passed by the
1616 // process that is now rendering the frame. 1625 // process that is now rendering the frame.
1617 if (proxy) 1626 if (proxy)
1618 proxy->SetReplicatedState(replicated_frame_state); 1627 proxy->SetReplicatedState(replicated_frame_state);
1619 1628
1620 // Safe to exit if no one else is using the process. 1629 // Safe to exit if no one else is using the process.
1621 // TODO(nasko): Remove the dependency on RenderViewImpl here and ref count 1630 // TODO(nasko): Remove the dependency on RenderViewImpl here and ref count
1622 // the process based on the lifetime of this RenderFrameImpl object. 1631 // the process based on the lifetime of this RenderFrameImpl object.
(...skipping 4414 matching lines...) Expand 10 before | Expand all | Expand 10 after
6037 int match_count, 6046 int match_count,
6038 int ordinal, 6047 int ordinal,
6039 const WebRect& selection_rect, 6048 const WebRect& selection_rect,
6040 bool final_status_update) { 6049 bool final_status_update) {
6041 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6050 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6042 selection_rect, ordinal, 6051 selection_rect, ordinal,
6043 final_status_update)); 6052 final_status_update));
6044 } 6053 }
6045 6054
6046 } // namespace content 6055 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698