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

Unified Diff: webkit/glue/webplugin_impl.cc

Issue 160596: This fixes the npapi-response-headers layout test, which started failing afte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/tools/layout_tests/test_expectations.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webplugin_impl.cc
===================================================================
--- webkit/glue/webplugin_impl.cc (revision 22379)
+++ webkit/glue/webplugin_impl.cc (working copy)
@@ -1070,10 +1070,11 @@
web_view->GetDelegate()->DidStopLoading(web_view);
}
loader->setDefersLoading(true);
- client_info->client->DidFinishLoading();
- // The WebPluginResourceClient pointer gets deleted soon after a call to
- // DidFinishLoading.
+ WebPluginResourceClient* resource_client = client_info->client;
+ // The ClientInfo can get deleted in the call to DidFinishLoading below.
+ // It is not safe to access this structure after that.
client_info->client = NULL;
+ resource_client->DidFinishLoading();
}
}
@@ -1082,10 +1083,11 @@
ClientInfo* client_info = GetClientInfoFromLoader(loader);
if (client_info && client_info->client) {
loader->setDefersLoading(true);
- client_info->client->DidFail();
- // The WebPluginResourceClient pointer gets deleted soon after a call to
- // DidFinishLoading.
+ WebPluginResourceClient* resource_client = client_info->client;
+ // The ClientInfo can get deleted in the call to DidFail below.
+ // It is not safe to access this structure after that.
client_info->client = NULL;
+ resource_client->DidFail();
}
}
« no previous file with comments | « no previous file | webkit/tools/layout_tests/test_expectations.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698