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

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

Issue 1315413005: Fix assertion failure in ScriptRegexp::match (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed haraken's comments Created 5 years, 3 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
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/Optional.h"
10 #include "wtf/TemporaryChange.h" 11 #include "wtf/TemporaryChange.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class PLATFORM_EXPORT ScriptForbiddenScope { 15 class PLATFORM_EXPORT ScriptForbiddenScope {
15 public: 16 public:
16 ScriptForbiddenScope(); 17 ScriptForbiddenScope();
17 ~ScriptForbiddenScope(); 18 ~ScriptForbiddenScope();
18 19
19 class PLATFORM_EXPORT AllowUserAgentScript { 20 class PLATFORM_EXPORT AllowUserAgentScript {
20 public: 21 public:
21 AllowUserAgentScript(); 22 AllowUserAgentScript();
22 ~AllowUserAgentScript(); 23 ~AllowUserAgentScript();
23 private: 24 private:
24 TemporaryChange<unsigned> m_change; 25 Optional<TemporaryChange<unsigned>> m_change;
25 }; 26 };
26 27
27 static void enter(); 28 static void enter();
28 static void exit(); 29 static void exit();
29 static bool isScriptForbidden(); 30 static bool isScriptForbidden();
30 }; 31 };
31 32
32 } // namespace blink 33 } // namespace blink
33 34
34 #endif // ScriptForbiddenScope_h 35 #endif // ScriptForbiddenScope_h
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.cpp ('k') | Source/platform/ScriptForbiddenScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698