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

Unified Diff: Source/bindings/core/v8/V8RecursionScope.h

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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
« no previous file with comments | « Source/bindings/core/v8/V8PerIsolateData.cpp ('k') | Source/bindings/core/v8/V8StringResource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8RecursionScope.h
diff --git a/Source/bindings/core/v8/V8RecursionScope.h b/Source/bindings/core/v8/V8RecursionScope.h
index 36cea95deefb3f331d6f8b8aa014a077d508679a..10889a8b4eec085adac53d826d98597bc6e0012a 100644
--- a/Source/bindings/core/v8/V8RecursionScope.h
+++ b/Source/bindings/core/v8/V8RecursionScope.h
@@ -81,7 +81,7 @@ public:
return V8PerIsolateData::from(isolate)->recursionLevel();
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static bool properlyUsed(v8::Isolate* isolate)
{
return recursionLevel(isolate) > 0 || V8PerIsolateData::from(isolate)->internalScriptRecursionLevel() > 0;
@@ -91,25 +91,25 @@ public:
class MicrotaskSuppression {
public:
MicrotaskSuppression(v8::Isolate* isolate)
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
: m_isolate(isolate)
#endif
{
ASSERT(!ScriptForbiddenScope::isScriptForbidden());
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
V8PerIsolateData::from(m_isolate)->incrementInternalScriptRecursionLevel();
#endif
}
~MicrotaskSuppression()
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
V8PerIsolateData::from(m_isolate)->decrementInternalScriptRecursionLevel();
#endif
}
private:
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
v8::Isolate* m_isolate;
#endif
};
« no previous file with comments | « Source/bindings/core/v8/V8PerIsolateData.cpp ('k') | Source/bindings/core/v8/V8StringResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698