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

Unified Diff: Source/bindings/core/v8/V8PerIsolateData.cpp

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.h ('k') | Source/bindings/core/v8/V8RecursionScope.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8PerIsolateData.cpp
diff --git a/Source/bindings/core/v8/V8PerIsolateData.cpp b/Source/bindings/core/v8/V8PerIsolateData.cpp
index fae59078c148a7be117aa5c2e3a79b1ac7ff5557..3ecb13dfd7ae80a221fc026a6589dd4a32bb2215 100644
--- a/Source/bindings/core/v8/V8PerIsolateData.cpp
+++ b/Source/bindings/core/v8/V8PerIsolateData.cpp
@@ -43,7 +43,7 @@ namespace WebCore {
static V8PerIsolateData* mainThreadPerIsolateData = 0;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static void assertV8RecursionScope()
{
ASSERT(V8RecursionScope::properlyUsed(v8::Isolate::GetCurrent()));
@@ -69,13 +69,13 @@ V8PerIsolateData::V8PerIsolateData(v8::Isolate* isolate)
, m_constructorMode(ConstructorMode::CreateNewObject)
, m_recursionLevel(0)
, m_isHandlingRecursionLevelError(false)
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
, m_internalScriptRecursionLevel(0)
#endif
, m_gcEventData(adoptPtr(new GCEventData()))
, m_performingMicrotaskCheckpoint(false)
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
// currentThread will always be non-null in production, but can be null in Chromium unit tests.
if (blink::Platform::current()->currentThread())
isolate->AddCallCompletedCallback(&assertV8RecursionScope);
@@ -120,7 +120,7 @@ v8::Persistent<v8::Value>& V8PerIsolateData::ensureLiveRoot()
void V8PerIsolateData::dispose(v8::Isolate* isolate)
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
if (blink::Platform::current()->currentThread())
isolate->RemoveCallCompletedCallback(&assertV8RecursionScope);
#endif
« no previous file with comments | « Source/bindings/core/v8/V8PerIsolateData.h ('k') | Source/bindings/core/v8/V8RecursionScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698