Chromium Code Reviews| Index: content/browser/renderer_host/render_message_filter.cc |
| diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc |
| index 0684b0ffe77e6c5e71c9089403cfcb020a1b142e..6a407720b487d230c1ec81099e0bb540d152962d 100644 |
| --- a/content/browser/renderer_host/render_message_filter.cc |
| +++ b/content/browser/renderer_host/render_message_filter.cc |
| @@ -401,16 +401,23 @@ void RenderMessageFilter::OnMsgCreateWindow( |
| const ViewHostMsg_CreateWindow_Params& params, |
| int* route_id, |
| int* surface_id, |
| - int64* cloned_session_storage_namespace_id) { |
| - if (!content::GetContentClient()->browser()->CanCreateWindow( |
| + int64* cloned_session_storage_namespace_id, |
| + bool* no_js_access) { |
| + content::ContentBrowserClient::CanCreateWindowResult result = |
| + content::GetContentClient()->browser()->CanCreateWindow( |
| GURL(params.opener_url), GURL(params.opener_security_origin), |
| params.window_container_type, resource_context_, |
| - render_process_id_)) { |
| + render_process_id_); |
| + |
| + if (result == content::ContentBrowserClient::CANNOT_CREATE_WINDOW) { |
| *route_id = MSG_ROUTING_NONE; |
| *surface_id = 0; |
| return; |
| } |
| + *no_js_access = |
|
Andrew T Wilson (Slow)
2012/03/26 15:28:10
I'd move this to the check up above just to make s
|
| + result == content::ContentBrowserClient::CAN_CREATE_WINDOW_NO_JS_ACCESS; |
| + |
| #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND |
| // TODO(michaeln): Fix this. |
| // This is a bug in the existing impl, session storage is effectively |