Commit d3692949 authored by esprehn@chromium.org's avatar esprehn@chromium.org

Enable the AllowSuperUnsafeScript assert disabler in debug builds.

Don't crash debug builds when there's an AllowSuperUnsafeScript assert
disabler in place.

R=haraken@chromium.org,abarth@chromium.org
BUG=395164

Review URL: https://codereview.chromium.org/402303003

git-svn-id: svn://svn.chromium.org/blink/trunk@178615 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 56eef47f
......@@ -41,17 +41,13 @@ ScriptForbiddenScope::AllowUserAgentScript::~AllowUserAgentScript()
}
ScriptForbiddenScope::AllowSuperUnsafeScript::AllowSuperUnsafeScript()
#if !ASSERT_ENABLED
: m_change(s_scriptForbiddenCount, 0)
#endif
{
}
ScriptForbiddenScope::AllowSuperUnsafeScript::~AllowSuperUnsafeScript()
{
#if !ASSERT_ENABLED
RELEASE_ASSERT(!s_scriptForbiddenCount);
#endif
ASSERT(!s_scriptForbiddenCount);
}
} // namespace blink
......@@ -32,10 +32,8 @@ public:
public:
AllowSuperUnsafeScript();
~AllowSuperUnsafeScript();
#if !ASSERT_ENABLED
private:
TemporaryChange<unsigned> m_change;
#endif
};
static bool isScriptForbidden();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment