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

Unified Diff: webkit/tools/test_shell/simple_socket_stream_bridge.cc

Issue 8524016: webkit: Remove 1 exit time destructor and turn on -Wexit-time-destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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 | « webkit/support/webkit_support.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/simple_socket_stream_bridge.cc
diff --git a/webkit/tools/test_shell/simple_socket_stream_bridge.cc b/webkit/tools/test_shell/simple_socket_stream_bridge.cc
index b1174d3240f709a69d82d05f23d7ec70caf9a307..29ca159048b1fea88fc2f0aee6acec4eb93ee44a 100644
--- a/webkit/tools/test_shell/simple_socket_stream_bridge.cc
+++ b/webkit/tools/test_shell/simple_socket_stream_bridge.cc
@@ -20,12 +20,12 @@
using webkit_glue::WebSocketStreamHandleBridge;
-static const int kNoSocketId = 0;
+const int kNoSocketId = 0;
namespace {
MessageLoop* g_io_thread;
-scoped_refptr<net::URLRequestContext> g_request_context;
+net::URLRequestContext* g_request_context;
class WebSocketStreamHandleBridgeImpl
: public WebSocketStreamHandleBridge,
@@ -223,11 +223,14 @@ void WebSocketStreamHandleBridgeImpl::DoOnClose() {
void SimpleSocketStreamBridge::InitializeOnIOThread(
net::URLRequestContext* request_context) {
g_io_thread = MessageLoop::current();
- g_request_context = request_context;
+ if ((g_request_context = request_context))
+ g_request_context->AddRef();
}
void SimpleSocketStreamBridge::Cleanup() {
g_io_thread = NULL;
+ if (g_request_context)
+ g_request_context->Release();
g_request_context = NULL;
}
« no previous file with comments | « webkit/support/webkit_support.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698