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

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

Issue 2835007: Revert 49984 - patch from issue 2762014 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/cocoa/authorization_util.mm ('k') | libjingle.patch » ('j') | 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) 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 } 290 }
291 291
292 void RenderWidgetHelper::FreeTransportDIB(TransportDIB::Id dib_id) { 292 void RenderWidgetHelper::FreeTransportDIB(TransportDIB::Id dib_id) {
293 AutoLock locked(allocated_dibs_lock_); 293 AutoLock locked(allocated_dibs_lock_);
294 294
295 const std::map<TransportDIB::Id, int>::iterator 295 const std::map<TransportDIB::Id, int>::iterator
296 i = allocated_dibs_.find(dib_id); 296 i = allocated_dibs_.find(dib_id);
297 297
298 if (i != allocated_dibs_.end()) { 298 if (i != allocated_dibs_.end()) {
299 if (HANDLE_EINTR(close(i->second)) < 0) 299 HANDLE_EINTR(close(i->second));
300 PLOG(ERROR) << "close";
301 allocated_dibs_.erase(i); 300 allocated_dibs_.erase(i);
302 } else { 301 } else {
303 DLOG(WARNING) << "Renderer asked us to free unknown transport DIB"; 302 DLOG(WARNING) << "Renderer asked us to free unknown transport DIB";
304 } 303 }
305 } 304 }
306 305
307 void RenderWidgetHelper::ClearAllocatedDIBs() { 306 void RenderWidgetHelper::ClearAllocatedDIBs() {
308 for (std::map<TransportDIB::Id, int>::iterator 307 for (std::map<TransportDIB::Id, int>::iterator
309 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) { 308 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) {
310 if (HANDLE_EINTR(close(i->second)) < 0) 309 HANDLE_EINTR(close(i->second));
311 PLOG(ERROR) << "close: " << i->first;
312 } 310 }
313 311
314 allocated_dibs_.clear(); 312 allocated_dibs_.clear();
315 } 313 }
316 #endif 314 #endif
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/authorization_util.mm ('k') | libjingle.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698