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

Side by Side Diff: Source/core/dom/ExecutionContext.cpp

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check in History.cpp Created 5 years, 11 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 | « Source/core/dom/ExecutionContext.h ('k') | Source/core/dom/RemoteSecurityContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/dom/RemoteSecurityContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698