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

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

Issue 2332073002: Adds a test that verifies that navigating in the unload handler while (Closed)
Patch Set: remove TODO Created 4 years, 3 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
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 base::IntToString(proxy->routing_id())); 1679 base::IntToString(proxy->routing_id()));
1680 base::debug::SetCrashKeyValue( 1680 base::debug::SetCrashKeyValue(
1681 "swapout_view_id", base::IntToString(render_view->GetRoutingID())); 1681 "swapout_view_id", base::IntToString(render_view->GetRoutingID()));
1682 CHECK(!render_view->main_render_frame_); 1682 CHECK(!render_view->main_render_frame_);
1683 } 1683 }
1684 1684
1685 if (!success) { 1685 if (!success) {
1686 // The swap can fail when the frame is detached during swap (this can 1686 // The swap can fail when the frame is detached during swap (this can
1687 // happen while running the unload handlers). When that happens, delete 1687 // happen while running the unload handlers). When that happens, delete
1688 // the proxy. 1688 // the proxy.
1689 // TODO(lfg): Handle the case where a navigation started during swap.
1690 // See https://crbug.com/590054 for more details.
1691 proxy->frameDetached(blink::WebRemoteFrameClient::DetachType::Swap); 1689 proxy->frameDetached(blink::WebRemoteFrameClient::DetachType::Swap);
1692 return; 1690 return;
1693 } 1691 }
1694 1692
1695 if (is_loading) 1693 if (is_loading)
1696 proxy->OnDidStartLoading(); 1694 proxy->OnDidStartLoading();
1697 1695
1698 // Initialize the WebRemoteFrame with the replication state passed by the 1696 // Initialize the WebRemoteFrame with the replication state passed by the
1699 // process that is now rendering the frame. 1697 // process that is now rendering the frame.
1700 proxy->SetReplicatedState(replicated_frame_state); 1698 proxy->SetReplicatedState(replicated_frame_state);
(...skipping 4650 matching lines...) Expand 10 before | Expand all | Expand 10 after
6351 // event target. Potentially a Pepper plugin will receive the event. 6349 // event target. Potentially a Pepper plugin will receive the event.
6352 // In order to tell whether a plugin gets the last mouse event and which it 6350 // In order to tell whether a plugin gets the last mouse event and which it
6353 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6351 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6354 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6352 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6355 // |pepper_last_mouse_event_target_|. 6353 // |pepper_last_mouse_event_target_|.
6356 pepper_last_mouse_event_target_ = nullptr; 6354 pepper_last_mouse_event_target_ = nullptr;
6357 #endif 6355 #endif
6358 } 6356 }
6359 6357
6360 } // namespace content 6358 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698