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

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

Issue 2010563004: content: Not all memory creation failures are out of memory errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « content/renderer/media/renderer_gpu_video_accelerator_factories.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { 1277 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) {
1278 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); 1278 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_));
1279 } 1279 }
1280 1280
1281 void RenderThreadImpl::RecordComputedAction(const std::string& action) { 1281 void RenderThreadImpl::RecordComputedAction(const std::string& action) {
1282 Send(new ViewHostMsg_UserMetricsRecordAction(action)); 1282 Send(new ViewHostMsg_UserMetricsRecordAction(action));
1283 } 1283 }
1284 1284
1285 std::unique_ptr<base::SharedMemory> 1285 std::unique_ptr<base::SharedMemory>
1286 RenderThreadImpl::HostAllocateSharedMemoryBuffer(size_t size) { 1286 RenderThreadImpl::HostAllocateSharedMemoryBuffer(size_t size) {
1287 return ChildThreadImpl::AllocateSharedMemory(size, thread_safe_sender()); 1287 return ChildThreadImpl::AllocateSharedMemory(size, thread_safe_sender(),
1288 nullptr);
1288 } 1289 }
1289 1290
1290 cc::SharedBitmapManager* RenderThreadImpl::GetSharedBitmapManager() { 1291 cc::SharedBitmapManager* RenderThreadImpl::GetSharedBitmapManager() {
1291 return shared_bitmap_manager(); 1292 return shared_bitmap_manager();
1292 } 1293 }
1293 1294
1294 void RenderThreadImpl::RegisterExtension(v8::Extension* extension) { 1295 void RenderThreadImpl::RegisterExtension(v8::Extension* extension) {
1295 WebScriptController::registerExtension(extension); 1296 WebScriptController::registerExtension(extension);
1296 } 1297 }
1297 1298
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
2088 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2089 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2089 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2090 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2090 2091
2091 blink::mainThreadIsolate()->MemoryPressureNotification( 2092 blink::mainThreadIsolate()->MemoryPressureNotification(
2092 v8_memory_pressure_level); 2093 v8_memory_pressure_level);
2093 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2094 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2094 v8_memory_pressure_level); 2095 v8_memory_pressure_level);
2095 } 2096 }
2096 2097
2097 } // namespace content 2098 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_gpu_video_accelerator_factories.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698