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

Unified Diff: chrome/renderer/extensions/chrome_v8_context_set.cc

Issue 195973002: Change DCHECK_IS_ON() to DCHECK_IS_ON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep a comment Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/chrome_v8_context_set.cc
diff --git a/chrome/renderer/extensions/chrome_v8_context_set.cc b/chrome/renderer/extensions/chrome_v8_context_set.cc
index 391f3ad49d44e34c37c5fa65ede03a1f92f601b2..74a0a6d21e7cb47f3055b47e4a3daa81ff085a9f 100644
--- a/chrome/renderer/extensions/chrome_v8_context_set.cc
+++ b/chrome/renderer/extensions/chrome_v8_context_set.cc
@@ -35,16 +35,16 @@ int ChromeV8ContextSet::size() const {
}
void ChromeV8ContextSet::Add(ChromeV8Context* context) {
- if (DCHECK_IS_ON()) {
- // It's OK to insert the same context twice, but we should only ever have
- // one ChromeV8Context per v8::Context.
- for (ContextSet::iterator iter = contexts_.begin(); iter != contexts_.end();
- ++iter) {
- ChromeV8Context* candidate = *iter;
- if (candidate != context)
- DCHECK(candidate->v8_context() != context->v8_context());
- }
+#if DCHECK_IS_ON
+ // It's OK to insert the same context twice, but we should only ever have
+ // one ChromeV8Context per v8::Context.
+ for (ContextSet::iterator iter = contexts_.begin(); iter != contexts_.end();
+ ++iter) {
+ ChromeV8Context* candidate = *iter;
+ if (candidate != context)
+ DCHECK(candidate->v8_context() != context->v8_context());
}
+#endif
contexts_.insert(context);
}
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_context.cc ('k') | chrome/renderer/extensions/logging_native_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698