OLD | NEW |
---|---|
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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1157 | 1157 |
1158 const base::CommandLine& command_line = | 1158 const base::CommandLine& command_line = |
1159 *base::CommandLine::ForCurrentProcess(); | 1159 *base::CommandLine::ForCurrentProcess(); |
1160 | 1160 |
1161 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 1161 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
1162 if (command_line.HasSwitch(switches::kEnableVtune)) | 1162 if (command_line.HasSwitch(switches::kEnableVtune)) |
1163 gin::Debug::SetJitCodeEventHandler(vTune::GetVtuneCodeEventHandler()); | 1163 gin::Debug::SetJitCodeEventHandler(vTune::GetVtuneCodeEventHandler()); |
1164 #endif | 1164 #endif |
1165 | 1165 |
1166 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); | 1166 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); |
1167 GetContentClient()->renderer()->SetRuntimeFeatures(); | |
clamy
2016/09/16 12:00:13
Quick sanity check: we're sure the ContentRenderer
jochen (gone - plz use gerrit)
2016/09/16 12:25:08
yeah, that's guaranteed
| |
1167 | 1168 |
1168 blink_platform_impl_.reset(new RendererBlinkPlatformImpl( | 1169 blink_platform_impl_.reset(new RendererBlinkPlatformImpl( |
1169 renderer_scheduler_.get(), | 1170 renderer_scheduler_.get(), |
1170 GetRemoteInterfaces()->GetWeakPtr())); | 1171 GetRemoteInterfaces()->GetWeakPtr())); |
1171 blink::initialize(blink_platform_impl_.get()); | 1172 blink::initialize(blink_platform_impl_.get()); |
1172 | 1173 |
1173 v8::Isolate* isolate = blink::mainThreadIsolate(); | 1174 v8::Isolate* isolate = blink::mainThreadIsolate(); |
1174 isolate->SetCreateHistogramFunction(CreateHistogram); | 1175 isolate->SetCreateHistogramFunction(CreateHistogram); |
1175 isolate->SetAddHistogramSampleFunction(AddHistogramSample); | 1176 isolate->SetAddHistogramSampleFunction(AddHistogramSample); |
1176 renderer_scheduler_->SetRAILModeObserver(this); | 1177 renderer_scheduler_->SetRAILModeObserver(this); |
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2265 if (blink::mainThreadIsolate()) { | 2266 if (blink::mainThreadIsolate()) { |
2266 blink::mainThreadIsolate()->MemoryPressureNotification( | 2267 blink::mainThreadIsolate()->MemoryPressureNotification( |
2267 v8::MemoryPressureLevel::kCritical); | 2268 v8::MemoryPressureLevel::kCritical); |
2268 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2269 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
2269 v8::MemoryPressureLevel::kCritical); | 2270 v8::MemoryPressureLevel::kCritical); |
2270 } | 2271 } |
2271 } | 2272 } |
2272 | 2273 |
2273 | 2274 |
2274 } // namespace content | 2275 } // namespace content |
OLD | NEW |