summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-17 22:06:48 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-17 22:06:48 +0000
commit7a132124222851a65853386c04fd447c4416d7a0 (patch)
tree941522b0f0d61d956e3f6e84b9cc4b3acda4095b /base
parent2d75e49311c7be4dfd8f52612c9bbda20283811d (diff)
downloadchromium_src-7a132124222851a65853386c04fd447c4416d7a0.zip
chromium_src-7a132124222851a65853386c04fd447c4416d7a0.tar.gz
chromium_src-7a132124222851a65853386c04fd447c4416d7a0.tar.bz2
Mark MessageLoop::delayed_work_queue_ as initialized so Purify doesn't report any UMRs when reading its comparator.
BUG=5555 Review URL: http://codereview.chromium.org/14810 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7171 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/message_loop.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 12ad3fa..76f75d5 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/memory_debug.h"
#include "base/message_pump_default.h"
#include "base/string_util.h"
#include "base/thread_local.h"
@@ -107,6 +108,14 @@ MessageLoop::MessageLoop(Type type)
pump_ = new base::MessagePumpDefault();
}
#endif // OS_POSIX
+
+ // We override the PURIFY build to disregard any UMRs in delayed_work_queue_.
+ // This avoids an error in pop(), which pushes the |comp| field onto the
+ // stack. The |comp| field is uninitialized, since it is std::less, which is
+ // an empty struct -- VS reserves 1 byte for this struct, which will never
+ // be initialized. See http://crbug.com/5555.
+ base::MemoryDebug::MarkAsInitialized(&delayed_work_queue_,
+ sizeof(delayed_work_queue_));
}
MessageLoop::~MessageLoop() {