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

Side by Side Diff: chrome/browser/renderer_host/render_widget_helper.cc

Issue 2762014: Mac: clang build (Closed)
Patch Set: more Created 10 years, 6 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/renderer_host/render_widget_helper.h" 5 #include "chrome/browser/renderer_host/render_widget_helper.h"
6 6
7 #include "base/eintr_wrapper.h" 7 #include "base/eintr_wrapper.h"
8 #include "base/thread.h" 8 #include "base/thread.h"
9 #include "chrome/browser/chrome_thread.h" 9 #include "chrome/browser/chrome_thread.h"
10 #include "chrome/browser/renderer_host/render_process_host.h" 10 #include "chrome/browser/renderer_host/render_process_host.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 } 288 }
289 289
290 void RenderWidgetHelper::FreeTransportDIB(TransportDIB::Id dib_id) { 290 void RenderWidgetHelper::FreeTransportDIB(TransportDIB::Id dib_id) {
291 AutoLock locked(allocated_dibs_lock_); 291 AutoLock locked(allocated_dibs_lock_);
292 292
293 const std::map<TransportDIB::Id, int>::iterator 293 const std::map<TransportDIB::Id, int>::iterator
294 i = allocated_dibs_.find(dib_id); 294 i = allocated_dibs_.find(dib_id);
295 295
296 if (i != allocated_dibs_.end()) { 296 if (i != allocated_dibs_.end()) {
297 HANDLE_EINTR(close(i->second)); 297 if (HANDLE_EINTR(close(i->second)) < 0)
298 PLOG(ERROR) << "close";
298 allocated_dibs_.erase(i); 299 allocated_dibs_.erase(i);
299 } else { 300 } else {
300 DLOG(WARNING) << "Renderer asked us to free unknown transport DIB"; 301 DLOG(WARNING) << "Renderer asked us to free unknown transport DIB";
301 } 302 }
302 } 303 }
303 304
304 void RenderWidgetHelper::ClearAllocatedDIBs() { 305 void RenderWidgetHelper::ClearAllocatedDIBs() {
305 for (std::map<TransportDIB::Id, int>::iterator 306 for (std::map<TransportDIB::Id, int>::iterator
306 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) { 307 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) {
307 HANDLE_EINTR(close(i->second)); 308 if (HANDLE_EINTR(close(i->second)) < 0)
309 PLOG(ERROR) << "close: " << i->first;
308 } 310 }
309 311
310 allocated_dibs_.clear(); 312 allocated_dibs_.clear();
311 } 313 }
312 #endif 314 #endif
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/web_drop_target.h ('k') | chrome/browser/renderer_host/render_widget_host_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698