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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 // Unique identifier for each output surface created. 249 // Unique identifier for each output surface created.
250 uint32_t g_next_compositor_frame_sink_id = 1; 250 uint32_t g_next_compositor_frame_sink_id = 1;
251 251
252 // An implementation of mojom::RenderMessageFilter which can be mocked out 252 // An implementation of mojom::RenderMessageFilter which can be mocked out
253 // for tests which may indirectly send messages over this interface. 253 // for tests which may indirectly send messages over this interface.
254 mojom::RenderMessageFilter* g_render_message_filter_for_testing; 254 mojom::RenderMessageFilter* g_render_message_filter_for_testing;
255 255
256 // Keep the global RenderThreadImpl in a TLS slot so it is impossible to access 256 // Keep the global RenderThreadImpl in a TLS slot so it is impossible to access
257 // incorrectly from the wrong thread. 257 // incorrectly from the wrong thread.
258 base::LazyInstance<base::ThreadLocalPointer<RenderThreadImpl> > 258 base::LazyInstance<base::ThreadLocalPointer<RenderThreadImpl>>::DestructorAtExit
259 lazy_tls = LAZY_INSTANCE_INITIALIZER; 259 lazy_tls = LAZY_INSTANCE_INITIALIZER;
260 260
261 // v8::MemoryPressureLevel should correspond to base::MemoryPressureListener. 261 // v8::MemoryPressureLevel should correspond to base::MemoryPressureListener.
262 static_assert(static_cast<v8::MemoryPressureLevel>( 262 static_assert(static_cast<v8::MemoryPressureLevel>(
263 base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE) == 263 base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE) ==
264 v8::MemoryPressureLevel::kNone, "none level not align"); 264 v8::MemoryPressureLevel::kNone, "none level not align");
265 static_assert(static_cast<v8::MemoryPressureLevel>( 265 static_assert(static_cast<v8::MemoryPressureLevel>(
266 base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE) == 266 base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE) ==
267 v8::MemoryPressureLevel::kModerate, "moderate level not align"); 267 v8::MemoryPressureLevel::kModerate, "moderate level not align");
268 static_assert(static_cast<v8::MemoryPressureLevel>( 268 static_assert(static_cast<v8::MemoryPressureLevel>(
(...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 } 2380 }
2381 } 2381 }
2382 2382
2383 void RenderThreadImpl::OnRendererInterfaceRequest( 2383 void RenderThreadImpl::OnRendererInterfaceRequest(
2384 mojom::RendererAssociatedRequest request) { 2384 mojom::RendererAssociatedRequest request) {
2385 DCHECK(!renderer_binding_.is_bound()); 2385 DCHECK(!renderer_binding_.is_bound());
2386 renderer_binding_.Bind(std::move(request)); 2386 renderer_binding_.Bind(std::move(request));
2387 } 2387 }
2388 2388
2389 } // namespace content 2389 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698