Chromium Code Reviews| Index: components/plugins/renderer/webview_plugin.cc |
| diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc |
| index 81a26f43427684f980d4cb681c1315919cbe63f9..4bdc330a422ec4fd6ea1dc7e142f48ec49d7ae6b 100644 |
| --- a/components/plugins/renderer/webview_plugin.cc |
| +++ b/components/plugins/renderer/webview_plugin.cc |
| @@ -95,9 +95,8 @@ WebViewPlugin::~WebViewPlugin() { |
| } |
| void WebViewPlugin::ReplayReceivedData(WebPlugin* plugin) { |
| - const WebURLResponse& response = web_frame_->dataSource()->response(); |
| - if (!response.isNull()) { |
| - plugin->didReceiveResponse(response); |
| + if (!response_.isNull()) { |
| + plugin->didReceiveResponse(response_); |
| size_t total_bytes = 0; |
| for (std::list<std::string>::iterator it = data_.begin(); it != data_.end(); |
| ++it) { |
| @@ -124,6 +123,11 @@ void WebViewPlugin::ReplayReceivedData(WebPlugin* plugin) { |
| } |
| } |
| +void WebViewPlugin::didReceiveResponse(const WebURLResponse& response) { |
| + if (!response_.isNull()) |
|
tommycli
2016/09/15 23:53:35
This line used to be DCHECK(response_.isNull());
tommycli
2016/09/16 00:01:38
Restoring the old DCHECK crashes, so I'm guessing
Bernhard Bauer
2016/09/16 10:28:01
Huh, that's strange. Where would the non-null valu
Nate Chapin
2016/09/16 17:17:54
Yeah this patchset only works accidentally: I inve
|
| + response_ = response; |
| +} |
| + |
| void WebViewPlugin::RestoreTitleText() { |
| if (container_) |
| container_->element().setAttribute("title", old_title_); |