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() ...@@ -41,17 +41,13 @@ ScriptForbiddenScope::AllowUserAgentScript::~AllowUserAgentScript()
} }
ScriptForbiddenScope::AllowSuperUnsafeScript::AllowSuperUnsafeScript() ScriptForbiddenScope::AllowSuperUnsafeScript::AllowSuperUnsafeScript()
#if !ASSERT_ENABLED
: m_change(s_scriptForbiddenCount, 0) : m_change(s_scriptForbiddenCount, 0)
#endif
{ {
} }
ScriptForbiddenScope::AllowSuperUnsafeScript::~AllowSuperUnsafeScript() ScriptForbiddenScope::AllowSuperUnsafeScript::~AllowSuperUnsafeScript()
{ {
#if !ASSERT_ENABLED ASSERT(!s_scriptForbiddenCount);
RELEASE_ASSERT(!s_scriptForbiddenCount);
#endif
} }
} // namespace blink } // namespace blink
...@@ -32,10 +32,8 @@ public: ...@@ -32,10 +32,8 @@ public:
public: public:
AllowSuperUnsafeScript(); AllowSuperUnsafeScript();
~AllowSuperUnsafeScript(); ~AllowSuperUnsafeScript();
#if !ASSERT_ENABLED
private: private:
TemporaryChange<unsigned> m_change; TemporaryChange<unsigned> m_change;
#endif
}; };
static bool isScriptForbidden(); 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