OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2012 Google Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 String m_errorMessage; | 62 String m_errorMessage; |
63 int m_lineNumber; | 63 int m_lineNumber; |
64 int m_columnNumber; | 64 int m_columnNumber; |
65 int m_scriptId; | 65 int m_scriptId; |
66 String m_sourceURL; | 66 String m_sourceURL; |
67 RefPtrWillBeMember<ScriptCallStack> m_callStack; | 67 RefPtrWillBeMember<ScriptCallStack> m_callStack; |
68 }; | 68 }; |
69 | 69 |
70 ExecutionContext::ExecutionContext() | 70 ExecutionContext::ExecutionContext() |
71 : m_sandboxFlags(SandboxNone) | 71 : m_circularSequentialID(0) |
72 , m_circularSequentialID(0) | |
73 , m_timerNestingLevel(0) | 72 , m_timerNestingLevel(0) |
74 , m_inDispatchErrorEvent(false) | 73 , m_inDispatchErrorEvent(false) |
75 , m_activeDOMObjectsAreSuspended(false) | 74 , m_activeDOMObjectsAreSuspended(false) |
76 , m_activeDOMObjectsAreStopped(false) | 75 , m_activeDOMObjectsAreStopped(false) |
77 , m_strictMixedContentCheckingEnforced(false) | 76 , m_strictMixedContentCheckingEnforced(false) |
78 , m_windowFocusTokens(0) | 77 , m_windowFocusTokens(0) |
79 { | 78 { |
80 } | 79 } |
81 | 80 |
82 ExecutionContext::~ExecutionContext() | 81 ExecutionContext::~ExecutionContext() |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 ContextLifecycleNotifier& ExecutionContext::lifecycleNotifier() | 255 ContextLifecycleNotifier& ExecutionContext::lifecycleNotifier() |
257 { | 256 { |
258 return static_cast<ContextLifecycleNotifier&>(LifecycleContext<ExecutionCont
ext>::lifecycleNotifier()); | 257 return static_cast<ContextLifecycleNotifier&>(LifecycleContext<ExecutionCont
ext>::lifecycleNotifier()); |
259 } | 258 } |
260 | 259 |
261 bool ExecutionContext::isIteratingOverObservers() const | 260 bool ExecutionContext::isIteratingOverObservers() const |
262 { | 261 { |
263 return m_lifecycleNotifier && m_lifecycleNotifier->isIteratingOverObservers(
); | 262 return m_lifecycleNotifier && m_lifecycleNotifier->isIteratingOverObservers(
); |
264 } | 263 } |
265 | 264 |
266 void ExecutionContext::enforceSandboxFlags(SandboxFlags mask) | |
267 { | |
268 m_sandboxFlags |= mask; | |
269 | |
270 // The SandboxOrigin is stored redundantly in the security origin. | |
271 if (isSandboxed(SandboxOrigin) && securityContext().securityOrigin() && !sec
urityContext().securityOrigin()->isUnique()) { | |
272 securityContext().setSecurityOrigin(SecurityOrigin::createUnique()); | |
273 didUpdateSecurityOrigin(); | |
274 } | |
275 } | |
276 | |
277 void ExecutionContext::allowWindowFocus() | 265 void ExecutionContext::allowWindowFocus() |
278 { | 266 { |
279 ++m_windowFocusTokens; | 267 ++m_windowFocusTokens; |
280 } | 268 } |
281 | 269 |
282 void ExecutionContext::consumeWindowFocus() | 270 void ExecutionContext::consumeWindowFocus() |
283 { | 271 { |
284 if (m_windowFocusTokens == 0) | 272 if (m_windowFocusTokens == 0) |
285 return; | 273 return; |
286 --m_windowFocusTokens; | 274 --m_windowFocusTokens; |
(...skipping 12 matching lines...) Expand all Loading... |
299 #if ENABLE(OILPAN) | 287 #if ENABLE(OILPAN) |
300 visitor->trace(m_pendingExceptions); | 288 visitor->trace(m_pendingExceptions); |
301 visitor->trace(m_publicURLManager); | 289 visitor->trace(m_publicURLManager); |
302 visitor->trace(m_timeouts); | 290 visitor->trace(m_timeouts); |
303 HeapSupplementable<ExecutionContext>::trace(visitor); | 291 HeapSupplementable<ExecutionContext>::trace(visitor); |
304 #endif | 292 #endif |
305 LifecycleContext<ExecutionContext>::trace(visitor); | 293 LifecycleContext<ExecutionContext>::trace(visitor); |
306 } | 294 } |
307 | 295 |
308 } // namespace blink | 296 } // namespace blink |
OLD | NEW |