Index: Source/platform/ScriptForbiddenScope.h |
diff --git a/Source/platform/ScriptForbiddenScope.h b/Source/platform/ScriptForbiddenScope.h |
index 7aa518ce48e4ada168253c3896793356c66a4968..0d467530fe98bdc4a6dfbb38b91060b4cae0d439 100644 |
--- a/Source/platform/ScriptForbiddenScope.h |
+++ b/Source/platform/ScriptForbiddenScope.h |
@@ -24,6 +24,20 @@ public: |
TemporaryChange<unsigned> m_change; |
}; |
+ // FIXME: This should be removed. SuppressScriptForbiddenScopeInRelease is used |
+ // to exceptionally allow script execution in ScriptForbiddenScope, because |
+ // some real-world plugins try to execute script in ScriptForbiddenScope. |
+ // This is unsafe and we should get rid of all the unsafe script executions. |
+ class PLATFORM_EXPORT SuppressScriptForbiddenScopeInRelease { |
+ public: |
+ SuppressScriptForbiddenScopeInRelease(); |
+ ~SuppressScriptForbiddenScopeInRelease(); |
+#if !ASSERT_ENABLED |
+ private: |
+ TemporaryChange<unsigned> m_change; |
+#endif |
+ }; |
+ |
static bool isScriptForbidden(); |
}; |