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

Side by Side Diff: Source/platform/ScriptForbiddenScope.h

Issue 402303003: Enable the AllowSuperUnsafeScript assert disabler in debug builds. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/platform/ScriptForbiddenScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ScriptForbiddenScope_h 5 #ifndef ScriptForbiddenScope_h
6 #define ScriptForbiddenScope_h 6 #define ScriptForbiddenScope_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "wtf/Assertions.h" 9 #include "wtf/Assertions.h"
10 #include "wtf/TemporaryChange.h" 10 #include "wtf/TemporaryChange.h"
(...skipping 14 matching lines...) Expand all
25 }; 25 };
26 26
27 // FIXME: This should be removed. AllowSuperUnsafeScript is used 27 // FIXME: This should be removed. AllowSuperUnsafeScript is used
28 // to exceptionally allow script execution in ScriptForbiddenScope, because 28 // to exceptionally allow script execution in ScriptForbiddenScope, because
29 // some real-world plugins try to execute script in ScriptForbiddenScope. 29 // some real-world plugins try to execute script in ScriptForbiddenScope.
30 // This is unsafe and we should get rid of all the unsafe script executions. 30 // This is unsafe and we should get rid of all the unsafe script executions.
31 class PLATFORM_EXPORT AllowSuperUnsafeScript { 31 class PLATFORM_EXPORT AllowSuperUnsafeScript {
32 public: 32 public:
33 AllowSuperUnsafeScript(); 33 AllowSuperUnsafeScript();
34 ~AllowSuperUnsafeScript(); 34 ~AllowSuperUnsafeScript();
35 #if !ASSERT_ENABLED
36 private: 35 private:
37 TemporaryChange<unsigned> m_change; 36 TemporaryChange<unsigned> m_change;
38 #endif
39 }; 37 };
40 38
41 static bool isScriptForbidden(); 39 static bool isScriptForbidden();
42 }; 40 };
43 41
44 } // namespace blink 42 } // namespace blink
45 43
46 #endif // ScriptForbiddenScope_h 44 #endif // ScriptForbiddenScope_h
OLDNEW
« no previous file with comments | « no previous file | Source/platform/ScriptForbiddenScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698