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

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

Issue 922373004: Remove CHECK from createChildFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | 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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 } 2025 }
2026 } 2026 }
2027 2027
2028 blink::WebFrame* RenderFrameImpl::createChildFrame( 2028 blink::WebFrame* RenderFrameImpl::createChildFrame(
2029 blink::WebLocalFrame* parent, 2029 blink::WebLocalFrame* parent,
2030 const blink::WebString& name, 2030 const blink::WebString& name,
2031 blink::WebSandboxFlags sandbox_flags) { 2031 blink::WebSandboxFlags sandbox_flags) {
2032 // Synchronously notify the browser of a child frame creation to get the 2032 // Synchronously notify the browser of a child frame creation to get the
2033 // routing_id for the RenderFrame. 2033 // routing_id for the RenderFrame.
2034 int child_routing_id = MSG_ROUTING_NONE; 2034 int child_routing_id = MSG_ROUTING_NONE;
2035 CHECK(Send(new FrameHostMsg_CreateChildFrame( 2035 Send(new FrameHostMsg_CreateChildFrame(
2036 routing_id_, 2036 routing_id_, base::UTF16ToUTF8(name),
2037 base::UTF16ToUTF8(name), 2037 WebToContentSandboxFlags(sandbox_flags), &child_routing_id));
2038 WebToContentSandboxFlags(sandbox_flags),
2039 &child_routing_id)));
2040 2038
2041 // Allocation of routing id failed, so we can't create a child frame. This can 2039 // Allocation of routing id failed, so we can't create a child frame. This can
2042 // happen if this RenderFrameImpl's IPCs are being filtered when in swapped 2040 // happen if this RenderFrameImpl's IPCs are being filtered when in swapped
2043 // out state or synchronous IPC message above has failed. 2041 // out state or synchronous IPC message above has failed.
2044 if (child_routing_id == MSG_ROUTING_NONE) { 2042 if (child_routing_id == MSG_ROUTING_NONE) {
2045 NOTREACHED() << "Failed to allocate routing id for child frame."; 2043 NOTREACHED() << "Failed to allocate routing id for child frame.";
2046 return nullptr; 2044 return nullptr;
2047 } 2045 }
2048 2046
2049 // Create the RenderFrame and WebLocalFrame, linking the two. 2047 // Create the RenderFrame and WebLocalFrame, linking the two.
(...skipping 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after
4444 4442
4445 #if defined(ENABLE_BROWSER_CDMS) 4443 #if defined(ENABLE_BROWSER_CDMS)
4446 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 4444 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
4447 if (!cdm_manager_) 4445 if (!cdm_manager_)
4448 cdm_manager_ = new RendererCdmManager(this); 4446 cdm_manager_ = new RendererCdmManager(this);
4449 return cdm_manager_; 4447 return cdm_manager_;
4450 } 4448 }
4451 #endif // defined(ENABLE_BROWSER_CDMS) 4449 #endif // defined(ENABLE_BROWSER_CDMS)
4452 4450
4453 } // namespace content 4451 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698