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

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

Issue 203393002: Revert of Explicit notification and removal of lifecycle observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/workers/WorkerGlobalScope.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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 m_activeDOMObjectsAreSuspended = false; 89 m_activeDOMObjectsAreSuspended = false;
90 lifecycleNotifier().notifyResumingActiveDOMObjects(); 90 lifecycleNotifier().notifyResumingActiveDOMObjects();
91 } 91 }
92 92
93 void ExecutionContext::stopActiveDOMObjects() 93 void ExecutionContext::stopActiveDOMObjects()
94 { 94 {
95 m_activeDOMObjectsAreStopped = true; 95 m_activeDOMObjectsAreStopped = true;
96 lifecycleNotifier().notifyStoppingActiveDOMObjects(); 96 lifecycleNotifier().notifyStoppingActiveDOMObjects();
97 } 97 }
98 98
99 void ExecutionContext::removeAllLifecycleObservers()
100 {
101 lifecycleNotifier().removeAndNotifyAllObservers();
102 }
103
104 unsigned ExecutionContext::activeDOMObjectCount() 99 unsigned ExecutionContext::activeDOMObjectCount()
105 { 100 {
106 return lifecycleNotifier().activeDOMObjects().size(); 101 return lifecycleNotifier().activeDOMObjects().size();
107 } 102 }
108 103
109 void ExecutionContext::suspendScheduledTasks() 104 void ExecutionContext::suspendScheduledTasks()
110 { 105 {
111 suspendActiveDOMObjects(); 106 suspendActiveDOMObjects();
112 if (m_client) 107 if (m_client)
113 m_client->tasksWereSuspended(); 108 m_client->tasksWereSuspended();
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 333
339 RELEASE_ASSERT(m_client); 334 RELEASE_ASSERT(m_client);
340 // The SandboxOrigin is stored redundantly in the security origin. 335 // The SandboxOrigin is stored redundantly in the security origin.
341 if (isSandboxed(SandboxOrigin) && m_client->securityContext().securityOrigin () && !m_client->securityContext().securityOrigin()->isUnique()) { 336 if (isSandboxed(SandboxOrigin) && m_client->securityContext().securityOrigin () && !m_client->securityContext().securityOrigin()->isUnique()) {
342 m_client->securityContext().setSecurityOrigin(SecurityOrigin::createUniq ue()); 337 m_client->securityContext().setSecurityOrigin(SecurityOrigin::createUniq ue());
343 m_client->didUpdateSecurityOrigin(); 338 m_client->didUpdateSecurityOrigin();
344 } 339 }
345 } 340 }
346 341
347 } // namespace WebCore 342 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/workers/WorkerGlobalScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698