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

Unified Diff: webkit/plugins/ppapi/ppb_flash_impl.cc

Issue 6228004: Fix Pepper File IO callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 11 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
Index: webkit/plugins/ppapi/ppb_flash_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_flash_impl.cc b/webkit/plugins/ppapi/ppb_flash_impl.cc
index 8b1ff6c13c84a7975d63372ed9fecb77b5d58b1e..8f20203bd12555e3c8aa905317e5dc88c1d679a2 100644
--- a/webkit/plugins/ppapi/ppb_flash_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_impl.cc
@@ -422,13 +422,16 @@ void PPB_Flash_NetConnector_Impl::CompleteConnectTcp(
}
}
- callback_->Run(rv); // Will complete abortively if necessary.
-
- // Wipe everything out for safety.
- callback_ = NULL;
+ // Theoretically, the plugin should be allowed to try another |ConnectTcp()|
+ // from the callback.
+ scoped_refptr<TrackedCompletionCallback> callback;
+ callback.swap(callback_);
+ // Wipe everything else out for safety.
socket_out_ = NULL;
local_addr_out_ = NULL;
remote_addr_out_ = NULL;
+
+ callback->Run(rv); // Will complete abortively if necessary.
}
} // namespace ppapi
« webkit/plugins/ppapi/ppb_file_io_impl.h ('K') | « webkit/plugins/ppapi/ppb_file_io_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698