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

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

Issue 625583002: Properly suspend HTMLDocumentParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years 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/Document.cpp ('k') | Source/core/html/parser/HTMLDocumentParser.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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 { 80 {
81 } 81 }
82 82
83 bool ExecutionContext::hasPendingActivity() 83 bool ExecutionContext::hasPendingActivity()
84 { 84 {
85 return lifecycleNotifier().hasPendingActivity(); 85 return lifecycleNotifier().hasPendingActivity();
86 } 86 }
87 87
88 void ExecutionContext::suspendActiveDOMObjects() 88 void ExecutionContext::suspendActiveDOMObjects()
89 { 89 {
90 ASSERT(!m_activeDOMObjectsAreSuspended);
90 lifecycleNotifier().notifySuspendingActiveDOMObjects(); 91 lifecycleNotifier().notifySuspendingActiveDOMObjects();
91 m_activeDOMObjectsAreSuspended = true; 92 m_activeDOMObjectsAreSuspended = true;
92 } 93 }
93 94
94 void ExecutionContext::resumeActiveDOMObjects() 95 void ExecutionContext::resumeActiveDOMObjects()
95 { 96 {
97 ASSERT(m_activeDOMObjectsAreSuspended);
96 m_activeDOMObjectsAreSuspended = false; 98 m_activeDOMObjectsAreSuspended = false;
97 lifecycleNotifier().notifyResumingActiveDOMObjects(); 99 lifecycleNotifier().notifyResumingActiveDOMObjects();
98 } 100 }
99 101
100 void ExecutionContext::stopActiveDOMObjects() 102 void ExecutionContext::stopActiveDOMObjects()
101 { 103 {
102 m_activeDOMObjectsAreStopped = true; 104 m_activeDOMObjectsAreStopped = true;
103 lifecycleNotifier().notifyStoppingActiveDOMObjects(); 105 lifecycleNotifier().notifyStoppingActiveDOMObjects();
104 } 106 }
105 107
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 void ExecutionContext::trace(Visitor* visitor) 270 void ExecutionContext::trace(Visitor* visitor)
269 { 271 {
270 #if ENABLE(OILPAN) 272 #if ENABLE(OILPAN)
271 visitor->trace(m_pendingExceptions); 273 visitor->trace(m_pendingExceptions);
272 HeapSupplementable<ExecutionContext>::trace(visitor); 274 HeapSupplementable<ExecutionContext>::trace(visitor);
273 #endif 275 #endif
274 LifecycleContext<ExecutionContext>::trace(visitor); 276 LifecycleContext<ExecutionContext>::trace(visitor);
275 } 277 }
276 278
277 } // namespace blink 279 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/parser/HTMLDocumentParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698