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

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

Issue 965393002: Simplify ContextLifecycleNotifier's handling of ActiveDOMObjects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: manually count the ActiveDOMObjects instead Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/frame/DOMWindowLifecycleNotifier.cpp » ('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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 m_activeDOMObjectsAreSuspended = false; 93 m_activeDOMObjectsAreSuspended = false;
94 notifyResumingActiveDOMObjects(); 94 notifyResumingActiveDOMObjects();
95 } 95 }
96 96
97 void ExecutionContext::stopActiveDOMObjects() 97 void ExecutionContext::stopActiveDOMObjects()
98 { 98 {
99 m_activeDOMObjectsAreStopped = true; 99 m_activeDOMObjectsAreStopped = true;
100 notifyStoppingActiveDOMObjects(); 100 notifyStoppingActiveDOMObjects();
101 } 101 }
102 102
103 unsigned ExecutionContext::activeDOMObjectCount()
104 {
105 return activeDOMObjects().size();
106 }
107
108 void ExecutionContext::suspendScheduledTasks() 103 void ExecutionContext::suspendScheduledTasks()
109 { 104 {
110 suspendActiveDOMObjects(); 105 suspendActiveDOMObjects();
111 tasksWereSuspended(); 106 tasksWereSuspended();
112 } 107 }
113 108
114 void ExecutionContext::resumeScheduledTasks() 109 void ExecutionContext::resumeScheduledTasks()
115 { 110 {
116 resumeActiveDOMObjects(); 111 resumeActiveDOMObjects();
117 tasksWereResumed(); 112 tasksWereResumed();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 { 230 {
236 #if ENABLE(OILPAN) 231 #if ENABLE(OILPAN)
237 visitor->trace(m_pendingExceptions); 232 visitor->trace(m_pendingExceptions);
238 visitor->trace(m_publicURLManager); 233 visitor->trace(m_publicURLManager);
239 HeapSupplementable<ExecutionContext>::trace(visitor); 234 HeapSupplementable<ExecutionContext>::trace(visitor);
240 #endif 235 #endif
241 ContextLifecycleNotifier::trace(visitor); 236 ContextLifecycleNotifier::trace(visitor);
242 } 237 }
243 238
244 } // namespace blink 239 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/frame/DOMWindowLifecycleNotifier.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698