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

Unified Diff: Source/platform/ScriptForbiddenScope.h

Issue 403133002: Suppress ScriptForbiddenScope in Document.cpp and FrameView.cpp in release mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/NPV8Object.cpp ('k') | Source/platform/ScriptForbiddenScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/ScriptForbiddenScope.h
diff --git a/Source/platform/ScriptForbiddenScope.h b/Source/platform/ScriptForbiddenScope.h
index 7aa518ce48e4ada168253c3896793356c66a4968..e3894fdc98344b1a10714d2196c976bc81335306 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. AllowSuperUnsafeScript 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 AllowSuperUnsafeScript {
+ public:
+ AllowSuperUnsafeScript();
+ ~AllowSuperUnsafeScript();
+#if !ASSERT_ENABLED
+ private:
+ TemporaryChange<unsigned> m_change;
+#endif
+ };
+
static bool isScriptForbidden();
};
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/platform/ScriptForbiddenScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698