Chromium Code Reviews| Index: content/renderer/render_frame_impl.cc |
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
| index 335bd750df6a7541a9340a2a5d7bcb6148c1770c..22fe83198445ae361c24076439e63e55f7fe2796 100644 |
| --- a/content/renderer/render_frame_impl.cc |
| +++ b/content/renderer/render_frame_impl.cc |
| @@ -72,6 +72,7 @@ |
| #include "content/renderer/media/webmediaplayer_params.h" |
| #include "content/renderer/notification_provider.h" |
| #include "content/renderer/npapi/plugin_channel_host.h" |
| +#include "content/renderer/render_frame_proxy.h" |
| #include "content/renderer/render_process.h" |
| #include "content/renderer/render_thread_impl.h" |
| #include "content/renderer/render_view_impl.h" |
| @@ -366,10 +367,38 @@ RenderFrameImpl* RenderFrameImpl::FromRoutingID(int32 routing_id) { |
| } |
| // static |
| +void RenderFrameImpl::CreateFrame(int routing_id, int parent_routing_id) { |
| + LOG(ERROR) << "RF::CreateFrame: " << routing_id << ", child of: " |
| + << parent_routing_id; |
| + CHECK_NE(MSG_ROUTING_NONE, parent_routing_id); |
| + |
| + RenderFrameProxy* proxy = RenderFrameProxy::FromRoutingID(parent_routing_id); |
| + LOG(ERROR) << "RF::CreateFrame: " << routing_id << " proxy:" << proxy; |
| + |
| + // If the browser is sending a valid parent routing id, it better be created |
| + // and registered. |
| + CHECK(proxy); |
| + blink::WebRemoteFrame* parent_web_frame = proxy->GetWebFrame(); |
| + LOG(ERROR) << "RF::CreateFrame: " << routing_id |
| + << " render_view:" << proxy->render_view() << ", parent_web_frame:" << parent_web_frame; |
| + |
| + // Create the RenderFrame and WebLocalFrame, linking the two. |
| + RenderFrameImpl* render_frame = RenderFrameImpl::Create( |
| + proxy->render_view(), routing_id); |
| + blink::WebLocalFrame* web_frame = parent_web_frame->createLocalChild("", render_frame); |
|
ncarter (slow)
2014/06/25 01:07:56
Is "" the correct value for the name of the frame?
|
| + render_frame->SetWebFrame(web_frame); |
| + render_frame->Initialize(); |
| + |
| + LOG(ERROR) << "RF::CreateFrame: " << routing_id |
| + << " frame parent:" << render_frame->frame_->parent(); |
| +} |
| + |
| +// static |
| RenderFrame* RenderFrame::FromWebFrame(blink::WebFrame* web_frame) { |
| return RenderFrameImpl::FromWebFrame(web_frame); |
| } |
| +// static |
| RenderFrameImpl* RenderFrameImpl::FromWebFrame(blink::WebFrame* web_frame) { |
| FrameMap::iterator iter = g_frame_map.Get().find(web_frame); |
| if (iter != g_frame_map.Get().end()) |
| @@ -408,6 +437,9 @@ RenderFrameImpl::RenderFrameImpl(RenderViewImpl* render_view, int routing_id) |
| geolocation_dispatcher_(NULL), |
| screen_orientation_dispatcher_(NULL), |
| weak_factory_(this) { |
| + LOG(ERROR) << "RF[" << this << "]::RF:" |
| + << " routing_id:" << routing_id; |
| + |
| RenderThread::Get()->AddRoute(routing_id_, this); |
| std::pair<RoutingIDFrameMap::iterator, bool> result = |
| @@ -434,6 +466,8 @@ RenderFrameImpl::~RenderFrameImpl() { |
| render_view_->UnregisterVideoHoleFrame(this); |
| #endif |
| + LOG(ERROR) << "RF[" << this << "]::~RF"; |
| + |
| render_view_->UnregisterRenderFrame(this); |
| g_routing_id_frame_map.Get().erase(routing_id_); |
| RenderThread::Get()->RemoveRoute(routing_id_); |
| @@ -442,6 +476,7 @@ RenderFrameImpl::~RenderFrameImpl() { |
| void RenderFrameImpl::SetWebFrame(blink::WebLocalFrame* web_frame) { |
| DCHECK(!frame_); |
| + LOG(ERROR) << "RF[" << this << "]::SetWebFrame: map.insert(" << web_frame << ", " << this << ")"; |
| std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert( |
| std::make_pair(web_frame, this)); |
| CHECK(result.second) << "Inserting a duplicate item."; |
| @@ -653,11 +688,15 @@ bool RenderFrameImpl::Send(IPC::Message* message) { |
| delete message; |
| return false; |
| } |
| - if (is_swapped_out_ || render_view_->is_swapped_out()) { |
| + if (frame_->parent() == NULL && |
| + (is_swapped_out_ || render_view_->is_swapped_out())) { |
| + LOG(ERROR) << "RF[" << this << "]::Send:" |
| + << " main frame in swapped out state"; |
| if (!SwappedOutMessages::CanSendWhileSwappedOut(message)) { |
| delete message; |
| return false; |
| } |
| + |
| // In most cases, send IPCs through the proxy when swapped out. In some |
| // calls the associated RenderViewImpl routing id is used to send |
| // messages, so don't use the proxy. |
| @@ -669,7 +708,7 @@ bool RenderFrameImpl::Send(IPC::Message* message) { |
| } |
| bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) { |
| - GetContentClient()->SetActiveURL(frame_->document().url()); |
| + //GetContentClient()->SetActiveURL(frame_->document().url()); |
|
ncarter (slow)
2014/06/25 01:07:56
frame doesn't always have a document. If the frame
|
| ObserverListBase<RenderFrameObserver>::Iterator it(observers_); |
| RenderFrameObserver* observer; |
| @@ -721,9 +760,12 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) { |
| } |
| void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { |
| + LOG(ERROR) << "RF[" << this << "]::OnNavigate:" << routing_id_ << ":" << params.url; |
| MaybeHandleDebugURL(params.url); |
| - if (!render_view_->webview()) |
| + if (!render_view_->webview()) { |
| + LOG(ERROR) << "RF[" << this << "]::OnNavigate:" << routing_id_ << ": no webview()"; |
| return; |
| + } |
| FOR_EACH_OBSERVER( |
| RenderViewObserver, render_view_->observers_, Navigate(params.url)); |
| @@ -734,11 +776,16 @@ void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { |
| // If this is a stale back/forward (due to a recent navigation the browser |
| // didn't know about), ignore it. |
| - if (render_view_->IsBackForwardToStaleEntry(params, is_reload)) |
| + if (render_view_->IsBackForwardToStaleEntry(params, is_reload)) { |
| + LOG(ERROR) << "RF[" << this << "]::OnNavigate:" << routing_id_ << ": stale entry"; |
| return; |
| + } |
| // Swap this renderer back in if necessary. |
| - if (render_view_->is_swapped_out_) { |
| + if (render_view_->is_swapped_out_ && |
| + GetWebFrame() == render_view_->webview()->mainFrame()) { |
|
ncarter (slow)
2014/06/25 01:07:56
Could the second half of this clause be written as
|
| + LOG(ERROR) << "RF[" << this << "]::OnNavigate:" |
| + << " RV is swapped out, frame is the top-level, so unswap"; |
| // We marked the view as hidden when swapping the view out, so be sure to |
| // reset the visibility state before navigating to the new URL. |
| render_view_->webview()->setVisibilityState( |
| @@ -758,6 +805,9 @@ void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { |
| render_view_->SetSwappedOut(false); |
| is_swapped_out_ = false; |
| + } else { |
| + LOG(ERROR) << "RF[" << this << "]::OnNavigate:" |
| + << " RV is swapped out, but frame isn't the top-level one"; |
| } |
| if (params.should_clear_history_list) { |
| @@ -802,6 +852,7 @@ void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { |
| // have history state, then we need to navigate to it, which corresponds to a |
| // back/forward navigation event. |
| if (is_reload) { |
| + LOG(ERROR) << "RF[" << this << "]::OnNavigate:" << routing_id_ << ": reload"; |
| bool reload_original_url = |
| (params.navigation_type == |
| FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL); |
| @@ -813,6 +864,7 @@ void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { |
| else |
| frame->reload(ignore_cache); |
| } else if (params.page_state.IsValid()) { |
| + LOG(ERROR) << "RF[" << this << "]::OnNavigate:" << routing_id_ << ": valid page state"; |
| // We must know the page ID of the page we are navigating back to. |
| DCHECK_NE(params.page_id, -1); |
| scoped_ptr<HistoryEntry> entry = |
| @@ -824,6 +876,7 @@ void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { |
| render_view_->history_controller()->GoToEntry(entry.Pass(), cache_policy); |
| } |
| } else if (!params.base_url_for_data_url.is_empty()) { |
| + LOG(ERROR) << "RF[" << this << "]::OnNavigate:" << routing_id_ << ": data URL"; |
| // A loadData request with a specified base URL. |
| std::string mime_type, charset, data; |
| if (net::DataURL::Parse(params.url, &mime_type, &charset, &data)) { |
| @@ -841,6 +894,7 @@ void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { |
| } else { |
| // Navigate to the given URL. |
| WebURLRequest request(params.url); |
| + LOG(ERROR) << "RF[" << this << "]::OnNavigate:" << routing_id_ << ": navigate to URL"; |
| // A session history navigation should have been accompanied by state. |
| CHECK_EQ(params.page_id, -1); |
| @@ -920,6 +974,8 @@ void RenderFrameImpl::OnBeforeUnload() { |
| void RenderFrameImpl::OnSwapOut(int proxy_routing_id) { |
| RenderFrameProxy* proxy = NULL; |
| + bool is_site_per_process = |
| + CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess); |
| // Only run unload if we're not swapped out yet, but send the ack either way. |
| if (!is_swapped_out_ || !render_view_->is_swapped_out_) { |
| @@ -932,7 +988,8 @@ void RenderFrameImpl::OnSwapOut(int proxy_routing_id) { |
| // RenderFrameProxy as well so its routing id is registered for receiving |
| // IPC messages. |
| render_view_->SyncNavigationState(); |
| - proxy = RenderFrameProxy::CreateFrameProxy(proxy_routing_id, routing_id_); |
| + proxy = RenderFrameProxy::CreateProxyForFrame( |
| + proxy_routing_id, routing_id_); |
| // Synchronously run the unload handler before sending the ACK. |
| // TODO(creis): Call dispatchUnloadEvent unconditionally here to support |
| @@ -965,7 +1022,11 @@ void RenderFrameImpl::OnSwapOut(int proxy_routing_id) { |
| // run a second time, thanks to a check in FrameLoader::stopLoading. |
| // TODO(creis): Need to add a better way to do this that avoids running the |
| // beforeunload handler. For now, we just run it a second time silently. |
| - render_view_->NavigateToSwappedOutURL(frame_); |
| + if (!is_site_per_process || frame_->parent() == NULL) { |
| + LOG(ERROR) << "RF[" << this << "]::OnSwapOut:" |
| + << " navigate to swappedout://"; |
| + render_view_->NavigateToSwappedOutURL(frame_); |
| + } |
| // Let WebKit know that this view is hidden so it can drop resources and |
| // stop compositing. |
| @@ -985,8 +1046,21 @@ void RenderFrameImpl::OnSwapOut(int proxy_routing_id) { |
| // Now that all of the cleanup is complete and the browser side is notified, |
| // start using the RenderFrameProxy, if one is created. |
| - if (proxy) |
| - set_render_frame_proxy(proxy); |
| + if (proxy) { |
| + if (frame_->parent()) { |
| + LOG(ERROR) << "RF[" << this << "]::OnSwapOut:" |
| + << " will swap frames"; |
| + frame_->swap(proxy->GetWebFrame()); |
| + if (is_site_per_process) { |
|
ncarter (slow)
2014/06/25 01:07:56
This if check might be redundant -- if we're getti
|
| + // TODO(nasko): delete the frame here, since we've replaced it with a |
| + // proxy. |
|
ncarter (slow)
2014/06/25 01:07:56
Maybe use DeleteSoon to accomplish this TODO here.
|
| + } |
| + } else { |
| + LOG(ERROR) << "RF[" << this << "]::OnSwapOut:" |
| + << " parent, so will reuse RF"; |
| + set_render_frame_proxy(proxy); |
| + } |
| + } |
| } |
| void RenderFrameImpl::OnContextMenuClosed( |
| @@ -1526,6 +1600,7 @@ void RenderFrameImpl::frameDetached(blink::WebFrame* frame) { |
| FrameMap::iterator it = g_frame_map.Get().find(frame); |
| CHECK(it != g_frame_map.Get().end()); |
| CHECK_EQ(it->second, this); |
| + LOG(ERROR) << "RF[" << this << "]::map.erase:" << frame; |
| g_frame_map.Get().erase(it); |
| if (is_subframe) |
| @@ -1625,6 +1700,10 @@ void RenderFrameImpl::loadURLExternally( |
| blink::WebNavigationPolicy policy, |
| const blink::WebString& suggested_name) { |
| DCHECK(!frame_ || frame_ == frame); |
| + LOG(ERROR) << "RF[" << this << "]::loadURLExternally:" |
| + << " url:" << request.url() |
| + << " policy:" << policy; |
| + |
| Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame, request)); |
| if (policy == blink::WebNavigationPolicyDownload) { |
| render_view_->Send(new ViewHostMsg_DownloadUrl(render_view_->GetRoutingID(), |
| @@ -1647,8 +1726,11 @@ blink::WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( |
| blink::WebNavigationPolicy default_policy, |
| bool is_redirect) { |
| DCHECK(!frame_ || frame_ == frame); |
| - return DecidePolicyForNavigation( |
| + WebNavigationPolicy value = DecidePolicyForNavigation( |
| this, frame, extra_data, request, type, default_policy, is_redirect); |
| + LOG(ERROR) << "RF[" << this << "]::decidePolicyForNavigation:" |
| + << " returning:" << value; |
| + return value; |
| } |
| blink::WebHistoryItem RenderFrameImpl::historyItemForNewChildFrame( |
| @@ -1720,6 +1802,10 @@ void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame) { |
| DocumentState* document_state = DocumentState::FromDataSource(ds); |
| + LOG(ERROR) << "RF[" << this << "]::didStartProvisionalLoad: " |
| + << " frame:" << frame |
| + << " routing:" << routing_id_ |
| + << " url:" << ds->request().url(); |
| // We should only navigate to swappedout:// when is_swapped_out_ is true. |
| CHECK((ds->request().url() != GURL(kSwappedOutURL)) || |
| is_swapped_out_ || |
| @@ -1753,8 +1839,20 @@ void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame) { |
| DidStartProvisionalLoad(frame)); |
| FOR_EACH_OBSERVER(RenderFrameObserver, observers_, DidStartProvisionalLoad()); |
| - int parent_routing_id = frame->parent() ? |
| - FromWebFrame(frame->parent())->GetRoutingID() : -1; |
| + int parent_routing_id = -1; |
| + if (frame->parent()) { |
| + if (frame->parent()->isWebLocalFrame()) { |
|
ncarter (slow)
2014/06/25 01:07:56
Might be worth extracting this logic into a utilit
|
| + LOG(ERROR) << "RF[" << this << "]::didStartProvisionalLoad:" |
| + << " local frame: FromWebFrame(parent): " << FromWebFrame(frame->parent()); |
| + parent_routing_id = FromWebFrame(frame->parent())->GetRoutingID(); |
| + } else { |
| + LOG(ERROR) << "RF[" << this << "]::didStartProvisionalLoad:" |
| + << " remote frame: FromWebFrame(parent): " << |
| + RenderFrameProxy::FromWebFrame(frame->parent()); |
| + parent_routing_id = |
| + RenderFrameProxy::FromWebFrame(frame->parent())->routing_id(); |
| + } |
| + } |
| Send(new FrameHostMsg_DidStartProvisionalLoadForFrame( |
| routing_id_, parent_routing_id, ds->request().url())); |
| } |
| @@ -1901,6 +1999,11 @@ void RenderFrameImpl::didCommitProvisionalLoad( |
| // before updating the HistoryController state. |
| render_view_->UpdateSessionHistory(frame); |
| + LOG(ERROR) << "RF[" << this << "]::didCommitProvisionalLoad:" |
| + << " frame:" << frame |
| + << " commit:" << commit_type |
| + << " url:" << GetLoadingUrl(); |
| + |
| render_view_->history_controller()->UpdateForCommit(this, item, commit_type, |
| navigation_state->was_within_same_page()); |
| @@ -2344,13 +2447,19 @@ void RenderFrameImpl::willSendRequest( |
| if (request.targetType() == blink::WebURLRequest::TargetIsMainFrame) { |
| request.setFirstPartyForCookies(request.url()); |
| } else { |
| - request.setFirstPartyForCookies( |
| - frame->top()->document().firstPartyForCookies()); |
| + // TODO(nasko): When the top-level frame is remote, there is no document. |
| + // This is broken and should be fixed to propagate the URL. |
| + WebFrame* top = frame->top(); |
| + if (top->isWebLocalFrame()) { |
| + request.setFirstPartyForCookies( |
| + frame->top()->document().firstPartyForCookies()); |
|
ncarter (slow)
2014/06/25 01:07:56
Just "top". It's cleaner.
|
| + } |
| } |
| } |
| WebFrame* top_frame = frame->top(); |
| - if (!top_frame) |
| + // TODO(nasko): Hack around asking about top-frame data source. |
| + if (!top_frame || top_frame->isWebRemoteFrame()) |
| top_frame = frame; |
| WebDataSource* provisional_data_source = top_frame->provisionalDataSource(); |
| WebDataSource* top_data_source = top_frame->dataSource(); |
| @@ -2443,8 +2552,16 @@ void RenderFrameImpl::willSendRequest( |
| provider_id = provider->provider_id(); |
| } |
| - int parent_routing_id = frame->parent() ? |
| - FromWebFrame(frame->parent())->GetRoutingID() : -1; |
| + WebFrame* parent = frame->parent(); |
| + int parent_routing_id = MSG_ROUTING_NONE; |
| + if (!parent) { |
| + parent_routing_id = -1; |
| + } else if (parent->isWebLocalFrame()) { |
| + parent_routing_id = FromWebFrame(parent)->GetRoutingID(); |
| + } else { |
| + parent_routing_id = RenderFrameProxy::FromWebFrame(parent)->routing_id(); |
| + } |
| + |
| RequestExtraData* extra_data = new RequestExtraData(); |
| extra_data->set_visibility_state(render_view_->visibilityState()); |
| extra_data->set_custom_user_agent(custom_user_agent); |
| @@ -3115,6 +3232,9 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( |
| WebNavigationType type, |
| WebNavigationPolicy default_policy, |
| bool is_redirect) { |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " url:" << request.url(); |
| + |
| #ifdef OS_ANDROID |
| // The handlenavigation API is deprecated and will be removed once |
| // crbug.com/325351 is resolved. |
| @@ -3128,33 +3248,53 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( |
| type, |
| default_policy, |
| is_redirect)) { |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " url != swapped out && client->HandleNavigation"; |
| return blink::WebNavigationPolicyIgnore; |
| } |
| #endif |
| Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame, request)); |
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| + |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " is_swapped_out_:" << is_swapped_out_ |
| + << " rv->is_swapped_out():" << render_view_->is_swapped_out(); |
| + bool is_subframe = !!frame->parent(); |
| - if (is_swapped_out_ || render_view_->is_swapped_out()) { |
| - if (request.url() != GURL(kSwappedOutURL)) { |
| - // Targeted links may try to navigate a swapped out frame. Allow the |
| - // browser process to navigate the tab instead. Note that it is also |
| - // possible for non-targeted navigations (from this view) to arrive |
| - // here just after we are swapped out. It's ok to send them to the |
| - // browser, as long as they're for the top level frame. |
| - // TODO(creis): Ensure this supports targeted form submissions when |
| - // fixing http://crbug.com/101395. |
| - if (frame->parent() == NULL) { |
| - OpenURL(frame, request.url(), referrer, default_policy); |
| - return blink::WebNavigationPolicyIgnore; // Suppress the load here. |
| + if (command_line.HasSwitch(switches::kSitePerProcess) && is_subframe) { |
| + LOG(ERROR) |
| + << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " --site-per-process, so ignore swapped out state for subframes"; |
| + } else { |
| + if (is_swapped_out_ || render_view_->is_swapped_out()) { |
| + if (request.url() != GURL(kSwappedOutURL)) { |
| + // Targeted links may try to navigate a swapped out frame. Allow the |
| + // browser process to navigate the tab instead. Note that it is also |
| + // possible for non-targeted navigations (from this view) to arrive |
| + // here just after we are swapped out. It's ok to send them to the |
| + // browser, as long as they're for the top level frame. |
| + // TODO(creis): Ensure this supports targeted form submissions when |
| + // fixing http://crbug.com/101395. |
| + if (frame->parent() == NULL) { |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " OpenURL due to no parent frame"; |
| + OpenURL(frame, request.url(), referrer, default_policy); |
| + return blink::WebNavigationPolicyIgnore; // Suppress the load here. |
| + } |
| + |
| + // We should otherwise ignore in-process iframe navigations, if they |
| + // arrive just after we are swapped out. |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " ignore iframe navigation in swapped out state"; |
| + return blink::WebNavigationPolicyIgnore; |
| } |
| - // We should otherwise ignore in-process iframe navigations, if they |
| - // arrive just after we are swapped out. |
| - return blink::WebNavigationPolicyIgnore; |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " allow kSwappedOutURL"; |
| + // Allow kSwappedOutURL to complete. |
| + return default_policy; |
| } |
| - |
| - // Allow kSwappedOutURL to complete. |
| - return default_policy; |
| } |
| // Webkit is asking whether to navigate to a new URL. |
| @@ -3172,7 +3312,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( |
| // all top-level navigations to the browser to let it swap processes when |
| // crossing site boundaries. This is currently expected to break some script |
| // calls and navigations, such as form submissions. |
| - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| bool force_swap_due_to_flag = |
| command_line.HasSwitch(switches::kEnableStrictSiteIsolation) || |
| command_line.HasSwitch(switches::kSitePerProcess); |
| @@ -3187,7 +3326,11 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( |
| frame_url, |
| url, |
| net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " force swap from flags, same_domain:" << same_domain_or_host; |
| if (!same_domain_or_host || frame_url.scheme() != url.scheme()) { |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " OpenURL since force swap and not same domain"; |
| OpenURL(frame, url, referrer, default_policy); |
| return blink::WebNavigationPolicyIgnore; |
| } |
| @@ -3213,6 +3356,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( |
| // navigation. |
| render_view_->page_id_ = -1; |
| render_view_->last_page_id_sent_to_browser_ = -1; |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " OpenURL since browser handles request"; |
| OpenURL(frame, url, referrer, default_policy); |
| return blink::WebNavigationPolicyIgnore; // Suppress the load here. |
| } |
| @@ -3276,6 +3421,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( |
| } |
| if (should_fork) { |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " OpenURL since should fork"; |
| OpenURL( |
| frame, url, send_referrer ? referrer : Referrer(), default_policy); |
| return blink::WebNavigationPolicyIgnore; // Suppress the load here. |
| @@ -3315,6 +3462,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( |
| type == blink::WebNavigationTypeOther; |
| if (is_fork) { |
| + LOG(ERROR) << "RF[" << this << "]::DecidePolicyForNavigation:" |
| + << " OpenURL since is_fork"; |
| // Open the URL via the browser, not via WebKit. |
| OpenURL(frame, url, Referrer(), default_policy); |
| return blink::WebNavigationPolicyIgnore; |