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

Side by Side Diff: ui/base/gtk/g_object_destructor_filo.cc

Issue 7129053: Don't output warnings that don't output how to resolve them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 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 | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/base/gtk/g_object_destructor_filo.h" 5 #include "ui/base/gtk/g_object_destructor_filo.h"
6 6
7 #include <glib-object.h> 7 #include <glib-object.h>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 << ": hook not found (" << callback << ", " << context << ")."; 42 << ": hook not found (" << callback << ", " << context << ").";
43 return; 43 return;
44 } 44 }
45 HandlerList& dtors = iter->second; 45 HandlerList& dtors = iter->second;
46 if (dtors.empty()) { 46 if (dtors.empty()) {
47 LOG(DFATAL) << "Destructor list is empty for specified object " << object 47 LOG(DFATAL) << "Destructor list is empty for specified object " << object
48 << " Maybe it is being executed?"; 48 << " Maybe it is being executed?";
49 return; 49 return;
50 } 50 }
51 if (!dtors.front().equal(object, callback, context)) { 51 if (!dtors.front().equal(object, callback, context)) {
52 LOG(WARNING) << "Destructors should be unregistered the reverse order they " 52 // Reenable this warning once this bug is fixed:
53 << "were registered. But for object " << object << " " 53 // http://code.google.com/p/chromium/issues/detail?id=85603
54 << "deleted hook is "<< context << ", the last queued hook is " 54 VLOG(1) << "Destructors should be unregistered the reverse order they "
55 << dtors.front().context; 55 << "were registered. But for object " << object << " "
56 << "deleted hook is "<< context << ", the last queued hook is "
57 << dtors.front().context;
56 } 58 }
57 for (HandlerList::iterator i = dtors.begin(); i != dtors.end(); ++i) { 59 for (HandlerList::iterator i = dtors.begin(); i != dtors.end(); ++i) {
58 if (i->equal(object, callback, context)) { 60 if (i->equal(object, callback, context)) {
59 dtors.erase(i); 61 dtors.erase(i);
60 break; 62 break;
61 } 63 }
62 } 64 }
63 if (dtors.empty()) { 65 if (dtors.empty()) {
64 g_object_weak_unref(object, WeakNotifyThunk, this); 66 g_object_weak_unref(object, WeakNotifyThunk, this);
65 handler_map_.erase(iter); 67 handler_map_.erase(iter);
(...skipping 10 matching lines...) Expand all
76 HandlerList dtors; 78 HandlerList dtors;
77 iter->second.swap(dtors); 79 iter->second.swap(dtors);
78 handler_map_.erase(iter); 80 handler_map_.erase(iter);
79 81
80 // Execute hooks in local list in FILO order. 82 // Execute hooks in local list in FILO order.
81 for (HandlerList::iterator i = dtors.begin(); i != dtors.end(); ++i) 83 for (HandlerList::iterator i = dtors.begin(); i != dtors.end(); ++i)
82 i->callback(i->context, where_the_object_was); 84 i->callback(i->context, where_the_object_was);
83 } 85 }
84 86
85 } // napespace ui 87 } // napespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698