diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 21:07:23 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 21:07:23 +0000 |
commit | 0d663c08d66e6ab3238cc93b77a474375be005b9 (patch) | |
tree | b7d4ef4a2a86ab727e415fdf05ea2560fe5454d7 | |
parent | 2b1bf70f8dda17121697f7b2f62067e725dd8bea (diff) | |
download | chromium_src-0d663c08d66e6ab3238cc93b77a474375be005b9.zip chromium_src-0d663c08d66e6ab3238cc93b77a474375be005b9.tar.gz chromium_src-0d663c08d66e6ab3238cc93b77a474375be005b9.tar.bz2 |
Fixes a leak of a ResourceHandle that happens with synchronous XMLHttpRequests,
by using adoptRef() to get the reference count right.
BUG=5369
http://codereview.chromium.org/15019
R=darin
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7252 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/resource_handle_impl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/webkit/glue/resource_handle_impl.cc b/webkit/glue/resource_handle_impl.cc index 6df344f..66f321d 100644 --- a/webkit/glue/resource_handle_impl.cc +++ b/webkit/glue/resource_handle_impl.cc @@ -716,7 +716,7 @@ PassRefPtr<SharedBuffer> ResourceHandle::bufferedData() { ResourceResponse& response, Vector<char>& data, Frame*) { RefPtr<ResourceHandle> handle = - new ResourceHandle(request, NULL, false, false, false); + adoptRef(new ResourceHandle(request, NULL, false, false, false)); ResourceLoaderBridge::SyncLoadResponse sync_load_response; if (!handle->d->Start(&sync_load_response)) { |