summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/glue/webplugin_impl.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index a3148b1..2cc4962 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -734,6 +734,13 @@ void WebPluginImpl::didReceiveData(WebURLLoader* loader,
WebPluginResourceClient* client = GetClientFromLoader(loader);
if (!client)
return;
+
+ // ClientInfo can be removed from clients_ vector by next statements.
+ if (WebDevToolsAgent* devtools_agent = GetDevToolsAgent()) {
+ ClientInfo* client_info = GetClientInfoFromLoader(loader);
+ if (client_info)
+ devtools_agent->didReceiveData(client_info->id, length);
+ }
MultiPartResponseHandlerMap::iterator index =
multi_part_response_map_.find(client);
if (index != multi_part_response_map_.end()) {
@@ -744,12 +751,6 @@ void WebPluginImpl::didReceiveData(WebURLLoader* loader,
loader->setDefersLoading(true);
client->DidReceiveData(buffer, length, 0);
}
-
- if (WebDevToolsAgent* devtools_agent = GetDevToolsAgent()) {
- ClientInfo* client_info = GetClientInfoFromLoader(loader);
- if (client_info)
- devtools_agent->didReceiveData(client_info->id, length);
- }
}
void WebPluginImpl::didFinishLoading(WebURLLoader* loader) {