 Chromium Code Reviews
 Chromium Code Reviews Issue 1581193002:
  Track down crash during RenderFrameImpl::didCommitProvisionalLoad.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1581193002:
  Track down crash during RenderFrameImpl::didCommitProvisionalLoad.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 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 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1490 render_view_->suppress_dialogs_until_swap_out_ = false; | 1490 render_view_->suppress_dialogs_until_swap_out_ = false; | 
| 1491 | 1491 | 
| 1492 Send(new FrameHostMsg_SwapOut_ACK(routing_id_)); | 1492 Send(new FrameHostMsg_SwapOut_ACK(routing_id_)); | 
| 1493 | 1493 | 
| 1494 RenderViewImpl* render_view = render_view_.get(); | 1494 RenderViewImpl* render_view = render_view_.get(); | 
| 1495 bool is_main_frame = is_main_frame_; | 1495 bool is_main_frame = is_main_frame_; | 
| 1496 | 1496 | 
| 1497 // Now that all of the cleanup is complete and the browser side is notified, | 1497 // Now that all of the cleanup is complete and the browser side is notified, | 
| 1498 // start using the RenderFrameProxy, if one is created. | 1498 // start using the RenderFrameProxy, if one is created. | 
| 1499 if (proxy && swapped_out_forbidden) { | 1499 if (proxy && swapped_out_forbidden) { | 
| 1500 // The swap call deletes this RenderFrame via frameDetached. Do not access | |
| 1501 // any members after this call. | |
| 1502 // TODO(creis): WebFrame::swap() can return false. Most of those cases | |
| 1503 // should be due to the frame being detached during unload (in which case | |
| 1504 // the necessary cleanup has happened anyway), but it might be possible for | |
| 1505 // it to return false without detaching. Catch those cases below to track | |
| 1506 // down https://crbug.com/575245. | |
| 1500 frame_->swap(proxy->web_frame()); | 1507 frame_->swap(proxy->web_frame()); | 
| 
Charlie Reis
2016/01/13 23:30:49
dcheng: I'm not sure what we should do differently
 
dcheng
2016/01/14 00:15:25
We need to figure out the behavior of sync navigat
 | |
| 1501 | 1508 | 
| 1509 // For main frames, the swap should have cleared the RenderView's pointer to | |
| 1510 // this frame. | |
| 1511 if (is_main_frame) | |
| 1512 CHECK(!render_view->main_render_frame_); | |
| 1513 | |
| 1502 if (is_loading) | 1514 if (is_loading) | 
| 1503 proxy->OnDidStartLoading(); | 1515 proxy->OnDidStartLoading(); | 
| 1504 } | 1516 } | 
| 1505 | 1517 | 
| 1506 // In --site-per-process, initialize the WebRemoteFrame with the replication | 1518 // In --site-per-process, initialize the WebRemoteFrame with the replication | 
| 1507 // state passed by the process that is now rendering the frame. | 1519 // state passed by the process that is now rendering the frame. | 
| 1508 // TODO(alexmos): We cannot yet do this for swapped-out main frames, because | 1520 // TODO(alexmos): We cannot yet do this for swapped-out main frames, because | 
| 1509 // in that case we leave the LocalFrame as the main frame visible to Blink | 1521 // in that case we leave the LocalFrame as the main frame visible to Blink | 
| 1510 // and don't call swap() above. Because swap() is what creates a RemoteFrame | 1522 // and don't call swap() above. Because swap() is what creates a RemoteFrame | 
| 1511 // in proxy->web_frame(), the RemoteFrame will not exist for main frames. | 1523 // in proxy->web_frame(), the RemoteFrame will not exist for main frames. | 
| (...skipping 4206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5718 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5730 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 
| 5719 scoped_refptr<media::AudioOutputDevice> device = | 5731 scoped_refptr<media::AudioOutputDevice> device = | 
| 5720 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5732 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 
| 5721 security_origin); | 5733 security_origin); | 
| 5722 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5734 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 
| 5723 device->Stop(); | 5735 device->Stop(); | 
| 5724 callback.Run(status); | 5736 callback.Run(status); | 
| 5725 } | 5737 } | 
| 5726 | 5738 | 
| 5727 } // namespace content | 5739 } // namespace content | 
| OLD | NEW |