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); |
} |