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

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

Issue 304353004: Oilpan: Reduce RefPtr to WorkerGlobalScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 PassOwnPtr<LifecycleNotifier<ExecutionContext> > ExecutionContext::createLifecyc leNotifier() 308 PassOwnPtr<LifecycleNotifier<ExecutionContext> > ExecutionContext::createLifecyc leNotifier()
309 { 309 {
310 return ContextLifecycleNotifier::create(this); 310 return ContextLifecycleNotifier::create(this);
311 } 311 }
312 312
313 ContextLifecycleNotifier& ExecutionContext::lifecycleNotifier() 313 ContextLifecycleNotifier& ExecutionContext::lifecycleNotifier()
314 { 314 {
315 return static_cast<ContextLifecycleNotifier&>(LifecycleContext<ExecutionCont ext>::lifecycleNotifier()); 315 return static_cast<ContextLifecycleNotifier&>(LifecycleContext<ExecutionCont ext>::lifecycleNotifier());
316 } 316 }
317 317
318 void ExecutionContext::deleteLifecycleNotifier()
319 {
320 m_lifecycleNotifier.clear();
321 }
322
318 bool ExecutionContext::isIteratingOverObservers() const 323 bool ExecutionContext::isIteratingOverObservers() const
319 { 324 {
320 return m_lifecycleNotifier && m_lifecycleNotifier->isIteratingOverObservers( ); 325 return m_lifecycleNotifier && m_lifecycleNotifier->isIteratingOverObservers( );
321 } 326 }
322 327
323 void ExecutionContext::enforceSandboxFlags(SandboxFlags mask) 328 void ExecutionContext::enforceSandboxFlags(SandboxFlags mask)
324 { 329 {
325 m_sandboxFlags |= mask; 330 m_sandboxFlags |= mask;
326 331
327 RELEASE_ASSERT(m_client); 332 RELEASE_ASSERT(m_client);
328 // The SandboxOrigin is stored redundantly in the security origin. 333 // The SandboxOrigin is stored redundantly in the security origin.
329 if (isSandboxed(SandboxOrigin) && m_client->securityContext().securityOrigin () && !m_client->securityContext().securityOrigin()->isUnique()) { 334 if (isSandboxed(SandboxOrigin) && m_client->securityContext().securityOrigin () && !m_client->securityContext().securityOrigin()->isUnique()) {
330 m_client->securityContext().setSecurityOrigin(SecurityOrigin::createUniq ue()); 335 m_client->securityContext().setSecurityOrigin(SecurityOrigin::createUniq ue());
331 m_client->didUpdateSecurityOrigin(); 336 m_client->didUpdateSecurityOrigin();
332 } 337 }
333 } 338 }
334 339
335 } // namespace WebCore 340 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698