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

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

Issue 100253002: Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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 | Annotate | Revision Log
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/browser/renderer_host/render_widget_helper.h" 5 #include "content/browser/renderer_host/render_widget_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/posix/eintr_wrapper.h" 10 #include "base/posix/eintr_wrapper.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 } 374 }
375 } 375 }
376 376
377 void RenderWidgetHelper::FreeTransportDIB(TransportDIB::Id dib_id) { 377 void RenderWidgetHelper::FreeTransportDIB(TransportDIB::Id dib_id) {
378 base::AutoLock locked(allocated_dibs_lock_); 378 base::AutoLock locked(allocated_dibs_lock_);
379 379
380 const std::map<TransportDIB::Id, int>::iterator 380 const std::map<TransportDIB::Id, int>::iterator
381 i = allocated_dibs_.find(dib_id); 381 i = allocated_dibs_.find(dib_id);
382 382
383 if (i != allocated_dibs_.end()) { 383 if (i != allocated_dibs_.end()) {
384 if (HANDLE_EINTR(close(i->second)) < 0) 384 if (IGNORE_EINTR(close(i->second)) < 0)
385 PLOG(ERROR) << "close"; 385 PLOG(ERROR) << "close";
386 allocated_dibs_.erase(i); 386 allocated_dibs_.erase(i);
387 } else { 387 } else {
388 DLOG(WARNING) << "Renderer asked us to free unknown transport DIB"; 388 DLOG(WARNING) << "Renderer asked us to free unknown transport DIB";
389 } 389 }
390 } 390 }
391 391
392 void RenderWidgetHelper::ClearAllocatedDIBs() { 392 void RenderWidgetHelper::ClearAllocatedDIBs() {
393 for (std::map<TransportDIB::Id, int>::iterator 393 for (std::map<TransportDIB::Id, int>::iterator
394 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) { 394 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) {
395 if (HANDLE_EINTR(close(i->second)) < 0) 395 if (IGNORE_EINTR(close(i->second)) < 0)
396 PLOG(ERROR) << "close: " << i->first; 396 PLOG(ERROR) << "close: " << i->first;
397 } 397 }
398 398
399 allocated_dibs_.clear(); 399 allocated_dibs_.clear();
400 } 400 }
401 #endif 401 #endif
402 402
403 } // namespace content 403 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_sandbox_host_linux.cc ('k') | content/common/font_config_ipc_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698