summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 22:43:35 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 22:43:35 +0000
commitf870de84edd4aee692fadf6cfa8d126f6dada6a0 (patch)
tree8ac88709634497efd1dbc9fb1822d591c9b4db9f /webkit
parent620f57148c311c4dc2cf680a4a5861fbdcd29993 (diff)
downloadchromium_src-f870de84edd4aee692fadf6cfa8d126f6dada6a0.zip
chromium_src-f870de84edd4aee692fadf6cfa8d126f6dada6a0.tar.gz
chromium_src-f870de84edd4aee692fadf6cfa8d126f6dada6a0.tar.bz2
This fixes the npapi-response-headers layout test, which started failing after my CL 22369.
When a plugin stream load finishes it deletes the corresponding client information maintained by WebPluginImpl. We were referencing this structure after a call to DidFinishLoading on the resource client which caused this issue. This fixes bug http://code.google.com/p/chromium/issues/detail?id=18392 Bug=18392 Test=Covered by layout tests Review URL: http://codereview.chromium.org/160596 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22431 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webplugin_impl.cc14
-rw-r--r--webkit/tools/layout_tests/test_expectations.txt3
2 files changed, 8 insertions, 9 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 0d7524b..d7fee6d 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -1070,10 +1070,11 @@ void WebPluginImpl::didFinishLoading(WebURLLoader* loader) {
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 @@ void WebPluginImpl::didFail(WebURLLoader* loader,
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();
}
}
diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt
index 5f3e64f..1ea6a0a 100644
--- a/webkit/tools/layout_tests/test_expectations.txt
+++ b/webkit/tools/layout_tests/test_expectations.txt
@@ -3032,6 +3032,3 @@ BUG17974 WIN : LayoutTests/svg/custom/svg-fonts-in-html.html = FAIL
// This test seems to crash periodically on mac.
BUG18206 MAC : LayoutTests/fast/xmlhttprequest/xmlhttprequest-open-after-iframe-onload-remove-self.html = CRASH PASS
-
-// This test started failing after CL 22369
-BUG18392 WIN LINUX MAC : LayoutTests/http/tests/plugins/npapi-response-headers.html = FAIL TIMEOUT