Changeset 224356 in webkit
- Timestamp:
- Nov 2, 2017 2:56:30 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224353 r224356 1 2017-11-02 Ryosuke Niwa <rniwa@webkit.org> 2 3 Eliminate isMainThread() checks in most call sites of NoEventDispatchAssertion 4 https://bugs.webkit.org/show_bug.cgi?id=179161 5 6 Reviewed by Zalan Bujtas. 7 8 Introduced NoEventDispatchAssertion::InMainThread which bypasses the expensive isMainThread() check 9 in order to turn NoEventDispatchAssertion into a release assertion in a separate patch. 10 11 Also removed instances of NoEventDispatchAssertion in notifyChildNodeInserted and notifyChildNodeRemoved 12 and asserted that the caller has instantiated NoEventDispatchAssertion instead. 13 14 No new tests since there should be no behavioral changes. 15 16 * bindings/js/ScriptController.cpp: 17 (WebCore::ScriptController::canExecuteScripts): 18 * dom/Attr.cpp: 19 * dom/CharacterData.cpp: 20 * dom/ContainerNode.cpp: 21 (WebCore::ContainerNode::removeAllChildrenWithScriptAssertion): 22 (WebCore::ContainerNode::removeNodeWithScriptAssertion): 23 (WebCore::executeNodeInsertionWithScriptAssertion): 24 (WebCore::ContainerNode::removeDetachedChildren): Instantiated NoEventDispatchAssertion::InMainThread 25 so that notifyChildNodeRemoved would be called inside NoEventDispatchAssertion. 26 (WebCore::ContainerNode::insertBeforeCommon): 27 (WebCore::ContainerNode::appendChildCommon): 28 (WebCore::ContainerNode::removeBetween): 29 (WebCore::dispatchChildInsertionEvents): 30 (WebCore::dispatchChildRemovalEvents): 31 * dom/ContainerNodeAlgorithms.cpp: 32 (WebCore::notifyChildNodeInserted): Assert that the caller has instantiated NoEventDispatchAssertion. 33 (WebCore::notifyChildNodeRemoved): Ditto. 34 * dom/Document.cpp: 35 (WebCore::Document::resolveStyle): 36 (WebCore::Document::updateStyleIfNeeded): 37 (WebCore::Document::nodeChildrenWillBeRemoved): 38 (WebCore::Document::nodeWillBeRemoved): 39 (WebCore::Document::dispatchWindowEvent): Replaced RELEASE_ASSERT with ASSERT_WITH_SECURITY_IMPLICATION 40 for clarity since NoEventDispatchAssertion::isEventAllowedInMainThread() always returns true in release 41 builds right now. 42 (WebCore::Document::dispatchWindowLoadEvent): Ditto. 43 (WebCore::Document::applyPendingXSLTransformsTimerFired): Use ASSERT_WITH_SECURITY_IMPLICATION instead 44 of regular ASSERT. 45 * dom/Element.cpp: 46 (WebCore::Element::addShadowRoot): Instantiate NoEventDispatchAssertion::InMainThread to call 47 notifyChildNodeInserted will it. 48 (WebCore::Element::attachAttributeNodeIfNeeded): 49 (WebCore::Element::setAttributeNode): Fixed the indentation. 50 (WebCore::Element::setAttributeNodeNS): Ditto. 51 (WebCore::Element::dispatchFocusInEvent): 52 (WebCore::Element::dispatchFocusOutEvent): 53 * dom/EventDispatcher.cpp: 54 (WebCore::EventDispatcher::dispatchEvent): 55 * dom/NoEventDispatchAssertion.h: 56 (WebCore::NoEventDispatchAssertion::isEventDispatchAllowedInSubtree): Moved to InMainThread. 57 (WebCore::NoEventDispatchAssertion::InMainThread): Added. 58 (WebCore::NoEventDispatchAssertion::InMainThread::InMainThread): Assert that we're in the main thread 59 instead of exiting early. 60 (WebCore::NoEventDispatchAssertion::InMainThread::~InMainThread): Ditto. 61 (WebCore::NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree): Moved here. 62 (WebCore::NoEventDispatchAssertion::InMainThread::isEventAllowed): 63 * dom/Node.cpp: 64 (WebCore::Node::dispatchSubtreeModifiedEvent): 65 (WebCore::Node::dispatchDOMActivateEvent): 66 * dom/ScriptExecutionContext.cpp: 67 (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForDocumentSuspension): 68 (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): 69 (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): 70 * history/CachedPage.cpp: 71 (WebCore::CachedPage::restore): 72 * history/PageCache.cpp: 73 (WebCore::PageCache::addIfCacheable): 74 * page/LayoutContext.cpp: 75 (WebCore::LayoutContext::layout): 76 * rendering/RenderLayer.cpp: 77 (WebCore::RenderLayer::scrollRectToVisible): 78 1 79 2017-11-02 John Wilander <wilander@apple.com> 2 80 -
trunk/Source/WebCore/bindings/js/ScriptController.cpp
r224290 r224356 679 679 { 680 680 if (reason == AboutToExecuteScript) 681 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion:: isEventAllowedInMainThread());681 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventAllowed()); 682 682 683 683 if (m_frame.document() && m_frame.document()->isSandboxed(SandboxScripts)) { -
trunk/Source/WebCore/dom/Attr.cpp
r219856 r224356 26 26 #include "AttributeChangeInvalidation.h" 27 27 #include "Event.h" 28 #include "NoEventDispatchAssertion.h"29 28 #include "ScopedEventQueue.h" 30 29 #include "StyleProperties.h" -
trunk/Source/WebCore/dom/CharacterData.cpp
r223687 r224356 31 31 #include "MutationObserverInterestGroup.h" 32 32 #include "MutationRecord.h" 33 #include "NoEventDispatchAssertion.h"34 33 #include "ProcessingInstruction.h" 35 34 #include "RenderText.h" -
trunk/Source/WebCore/dom/ContainerNode.cpp
r223788 r224356 90 90 } else { 91 91 ASSERT(source == ContainerNode::ChildChangeSource::Parser); 92 NoEventDispatchAssertion assertNoEventDispatch;92 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 93 93 if (UNLIKELY(document().hasMutationObserversOfType(MutationObserver::ChildList))) { 94 94 ChildListMutationScope mutation(*this); … … 101 101 102 102 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates; 103 NoEventDispatchAssertion assertNoEventDispatch;103 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 104 104 105 105 document().nodeChildrenWillBeRemoved(*this); … … 121 121 ASSERT_WITH_SECURITY_IMPLICATION(childToRemove.parentNode() == this); 122 122 { 123 NoEventDispatchAssertion assertNoEventDispatch;123 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 124 124 ChildListMutationScope(*this).willRemoveChild(childToRemove); 125 125 } 126 126 127 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion:: isEventDispatchAllowedInSubtree(childToRemove));127 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree(childToRemove)); 128 128 if (source == ContainerNode::ChildChangeSource::API) { 129 129 childToRemove.notifyMutationObserversNodeWillDetach(); … … 145 145 146 146 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates; 147 NoEventDispatchAssertion assertNoEventDispatch;147 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 148 148 149 149 document().nodeWillBeRemoved(childToRemove); … … 175 175 NodeVector postInsertionNotificationTargets; 176 176 { 177 NoEventDispatchAssertion assertNoEventDispatch;177 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 178 178 doNodeInsertion(); 179 179 ChildListMutationScope(containerNode).childAdded(child); … … 193 193 } 194 194 195 ASSERT(NoEventDispatchAssertion:: isEventDispatchAllowedInSubtree(child));195 ASSERT(NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree(child)); 196 196 for (auto& target : postInsertionNotificationTargets) 197 197 target->didFinishInsertingNode(); … … 226 226 } 227 227 // FIXME: We should be able to ASSERT(!attached()) here: https://bugs.webkit.org/show_bug.cgi?id=107801 228 NoEventDispatchAssertion::InMainThread noEventDispatchAssertion; 228 229 removeDetachedChildrenInContainer(*this); 229 230 } … … 400 401 void ContainerNode::insertBeforeCommon(Node& nextChild, Node& newChild) 401 402 { 402 NoEventDispatchAssertion assertNoEventDispatch;403 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 403 404 404 405 ASSERT(!newChild.parentNode()); // Use insertBefore if you need to handle reparenting (and want DOM mutation events). … … 425 426 void ContainerNode::appendChildCommon(Node& child) 426 427 { 427 NoEventDispatchAssertion assertNoEventDispatch;428 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 428 429 429 430 child.setParentNode(this); … … 564 565 InspectorInstrumentation::didRemoveDOMNode(oldChild.document(), oldChild); 565 566 566 NoEventDispatchAssertion assertNoEventDispatch;567 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 567 568 568 569 ASSERT(oldChild.parentNode() == this); … … 763 764 return; 764 765 765 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion:: isEventDispatchAllowedInSubtree(child));766 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree(child)); 766 767 767 768 RefPtr<Node> c = &child; … … 780 781 static void dispatchChildRemovalEvents(Ref<Node>& child) 781 782 { 782 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion:: isEventDispatchAllowedInSubtree(child));783 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree(child)); 783 784 InspectorInstrumentation::willRemoveDOMNode(child->document(), child.get()); 784 785 -
trunk/Source/WebCore/dom/ContainerNodeAlgorithms.cpp
r223802 r224356 85 85 NodeVector notifyChildNodeInserted(ContainerNode& parentOfInsertedTree, Node& node) 86 86 { 87 NoEventDispatchAssertion assertNoEventDispatch;87 ASSERT(!NoEventDispatchAssertion::InMainThread::isEventAllowed()); 88 88 89 89 InspectorInstrumentation::didInsertDOMNode(node.document(), node); … … 148 148 void notifyChildNodeRemoved(ContainerNode& oldParentOfRemovedTree, Node& child) 149 149 { 150 NoEventDispatchAssertion assertNoEventDispatch; 150 // Assert that the caller of this function has an instance of NoEventDispatchAssertion. 151 ASSERT(!isMainThread() || !NoEventDispatchAssertion::InMainThread::isEventAllowed()); 151 152 152 153 // Tree scope has changed if the container node from which "node" is removed is in a document or a shadow root. -
trunk/Source/WebCore/dom/Document.cpp
r224320 r224356 1794 1794 1795 1795 { 1796 NoEventDispatchAssertion noEventDispatchAssertion;1796 NoEventDispatchAssertion::InMainThread noEventDispatchAssertion; 1797 1797 styleScope().flushPendingUpdate(); 1798 1798 frameView.willRecalcStyle(); … … 1805 1805 Style::PostResolutionCallbackDisabler disabler(*this); 1806 1806 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates; 1807 NoEventDispatchAssertion noEventDispatchAssertion;1807 NoEventDispatchAssertion::InMainThread noEventDispatchAssertion; 1808 1808 1809 1809 m_inStyleRecalc = true; … … 1925 1925 { 1926 1926 { 1927 NoEventDispatchAssertion noEventDispatchAssertion;1927 NoEventDispatchAssertion::InMainThread noEventDispatchAssertion; 1928 1928 ASSERT(isMainThread()); 1929 1929 ASSERT(!view() || !view()->isPainting()); … … 4086 4086 void Document::nodeChildrenWillBeRemoved(ContainerNode& container) 4087 4087 { 4088 NoEventDispatchAssertion assertNoEventDispatch;4088 ASSERT(!NoEventDispatchAssertion::InMainThread::isEventAllowed()); 4089 4089 4090 4090 removeFocusedNodeOfSubtree(container, true /* amongChildrenOnly */); … … 4119 4119 void Document::nodeWillBeRemoved(Node& node) 4120 4120 { 4121 NoEventDispatchAssertion assertNoEventDispatch;4121 ASSERT(!NoEventDispatchAssertion::InMainThread::isEventAllowed()); 4122 4122 4123 4123 removeFocusedNodeOfSubtree(node); … … 4263 4263 void Document::dispatchWindowEvent(Event& event, EventTarget* target) 4264 4264 { 4265 RELEASE_ASSERT(NoEventDispatchAssertion::isEventAllowedInMainThread());4265 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventAllowed()); 4266 4266 if (!m_domWindow) 4267 4267 return; … … 4271 4271 void Document::dispatchWindowLoadEvent() 4272 4272 { 4273 RELEASE_ASSERT(NoEventDispatchAssertion::isEventAllowedInMainThread());4273 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventAllowed()); 4274 4274 if (!m_domWindow) 4275 4275 return; … … 5101 5101 5102 5102 m_hasPendingXSLTransforms = false; 5103 ASSERT (NoEventDispatchAssertion::isEventAllowedInMainThread());5103 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventAllowed()); 5104 5104 for (auto& processingInstruction : styleScope().collectXSLTransforms()) { 5105 5105 ASSERT(processingInstruction->isXSL()); -
trunk/Source/WebCore/dom/Element.cpp
r224320 r224356 1772 1772 ASSERT(!newShadowRoot->hasChildNodes()); 1773 1773 ASSERT(!shadowRoot()); 1774 1775 if (renderer())1776 RenderTreeUpdater::tearDownRenderers(*this);1777 1774 1778 1775 ShadowRoot& shadowRoot = newShadowRoot; 1779 ensureElementRareData().setShadowRoot(WTFMove(newShadowRoot)); 1780 1781 shadowRoot.setHost(this); 1782 shadowRoot.setParentTreeScope(treeScope()); 1776 { 1777 NoEventDispatchAssertion::InMainThread noEventDispatchAssertion; 1778 if (renderer()) 1779 RenderTreeUpdater::tearDownRenderers(*this); 1780 1781 ensureElementRareData().setShadowRoot(WTFMove(newShadowRoot)); 1782 1783 shadowRoot.setHost(this); 1784 shadowRoot.setParentTreeScope(treeScope()); 1783 1785 1784 1786 #if !ASSERT_DISABLED 1785 ASSERT(notifyChildNodeInserted(*this, shadowRoot).isEmpty());1787 ASSERT(notifyChildNodeInserted(*this, shadowRoot).isEmpty()); 1786 1788 #else 1787 notifyChildNodeInserted(*this, shadowRoot);1789 notifyChildNodeInserted(*this, shadowRoot); 1788 1790 #endif 1789 1791 1790 invalidateStyleAndRenderersForSubtree(); 1791 1792 InspectorInstrumentation::didPushShadowRoot(*this, shadowRoot); 1792 invalidateStyleAndRenderersForSubtree(); 1793 } 1793 1794 1794 1795 if (shadowRoot.mode() == ShadowRootMode::UserAgent) 1795 1796 didAddUserAgentShadowRoot(shadowRoot); 1797 1798 InspectorInstrumentation::didPushShadowRoot(*this, shadowRoot); 1796 1799 } 1797 1800 … … 2147 2150 return; 2148 2151 2149 NoEventDispatchAssertion assertNoEventDispatch;2152 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 2150 2153 2151 2154 attrNode.attachToElement(*this); … … 2165 2168 2166 2169 { 2167 NoEventDispatchAssertionassertNoEventDispatch;2168 synchronizeAllAttributes();2170 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 2171 synchronizeAllAttributes(); 2169 2172 } 2170 2173 … … 2211 2214 return Exception { InUseAttributeError }; 2212 2215 2213 unsigned index = 0;2214 2215 2216 // Attr::value() will return its 'm_standaloneValue' member any time its Element is set to nullptr. We need to cache this value 2216 2217 // before making changes to attrNode's Element connections. 2217 2218 auto attrNodeValue = attrNode.value(); 2218 2219 unsigned index = 0; 2219 2220 { 2220 NoEventDispatchAssertionassertNoEventDispatch;2221 synchronizeAllAttributes();2222 auto& elementData = ensureUniqueElementData();2223 2224 index = elementData.findAttributeIndexByName(attrNode.qualifiedName());2225 2226 if (index != ElementData::attributeNotFound) {2227 if (oldAttrNode)2228 detachAttrNodeFromElementWithValue(oldAttrNode.get(), elementData.attributeAt(index).value());2229 else2230 oldAttrNode = Attr::create(document(), attrNode.qualifiedName(), elementData.attributeAt(index).value());2231 }2221 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 2222 synchronizeAllAttributes(); 2223 auto& elementData = ensureUniqueElementData(); 2224 2225 index = elementData.findAttributeIndexByName(attrNode.qualifiedName()); 2226 2227 if (index != ElementData::attributeNotFound) { 2228 if (oldAttrNode) 2229 detachAttrNodeFromElementWithValue(oldAttrNode.get(), elementData.attributeAt(index).value()); 2230 else 2231 oldAttrNode = Attr::create(document(), attrNode.qualifiedName(), elementData.attributeAt(index).value()); 2232 } 2232 2233 } 2233 2234 … … 2475 2476 void Element::dispatchFocusInEvent(const AtomicString& eventType, RefPtr<Element>&& oldFocusedElement) 2476 2477 { 2477 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion:: isEventAllowedInMainThread());2478 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventAllowed()); 2478 2479 ASSERT(eventType == eventNames().focusinEvent || eventType == eventNames().DOMFocusInEvent); 2479 2480 dispatchScopedEvent(FocusEvent::create(eventType, true, false, document().defaultView(), 0, WTFMove(oldFocusedElement))); … … 2482 2483 void Element::dispatchFocusOutEvent(const AtomicString& eventType, RefPtr<Element>&& newFocusedElement) 2483 2484 { 2484 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion:: isEventAllowedInMainThread());2485 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventAllowed()); 2485 2486 ASSERT(eventType == eventNames().focusoutEvent || eventType == eventNames().DOMFocusOutEvent); 2486 2487 dispatchScopedEvent(FocusEvent::create(eventType, true, false, document().defaultView(), 0, WTFMove(newFocusedElement))); -
trunk/Source/WebCore/dom/EventDispatcher.cpp
r224159 r224356 131 131 bool EventDispatcher::dispatchEvent(Node& node, Event& event) 132 132 { 133 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion:: isEventDispatchAllowedInSubtree(node));133 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree(node)); 134 134 Ref<Node> protectedNode(node); 135 135 RefPtr<FrameView> view = node.document().view(); -
trunk/Source/WebCore/dom/NoEventDispatchAssertion.h
r215787 r224356 64 64 } 65 65 66 static bool isEventDispatchAllowedInSubtree(Node& node) 67 { 68 return isEventAllowedInMainThread() || EventAllowedScope::isAllowedNode(node); 69 } 66 class InMainThread { 67 public: 68 InMainThread() 69 { 70 ASSERT(isMainThread()); 71 #if !ASSERT_DISABLED 72 ++s_count; 73 #endif 74 } 70 75 76 ~InMainThread() 77 { 78 ASSERT(isMainThread()); 79 #if !ASSERT_DISABLED 80 ASSERT(s_count); 81 --s_count; 82 #endif 83 } 84 85 static bool isEventDispatchAllowedInSubtree(Node& node) 86 { 87 return isEventAllowed() || EventAllowedScope::isAllowedNode(node); 88 } 89 90 static bool isEventAllowed() 91 { 92 ASSERT(isMainThread()); 93 #if !ASSERT_DISABLED 94 return !s_count; 95 #else 96 return true; 97 #endif 98 } 99 }; 100 71 101 #if !ASSERT_DISABLED 72 102 class EventAllowedScope { -
trunk/Source/WebCore/dom/Node.cpp
r224325 r224356 2327 2327 return; 2328 2328 2329 RELEASE_ASSERT(NoEventDispatchAssertion::isEventDispatchAllowedInSubtree(*this));2329 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree(*this)); 2330 2330 2331 2331 if (!document().hasListenerType(Document::DOMSUBTREEMODIFIED_LISTENER)) … … 2340 2340 bool Node::dispatchDOMActivateEvent(int detail, Event& underlyingEvent) 2341 2341 { 2342 RELEASE_ASSERT(NoEventDispatchAssertion::isEventAllowedInMainThread());2342 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventAllowed()); 2343 2343 Ref<UIEvent> event = UIEvent::create(eventNames().DOMActivateEvent, true, true, document().defaultView(), detail); 2344 2344 event->setUnderlyingEvent(&underlyingEvent); -
trunk/Source/WebCore/dom/ScriptExecutionContext.cpp
r224218 r224356 191 191 // An ASSERT_WITH_SECURITY_IMPLICATION or RELEASE_ASSERT will fire if this happens, but it's important to code 192 192 // canSuspend functions so it will not happen! 193 NoEventDispatchAssertion assertNoEventDispatch;193 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 194 194 for (auto* activeDOMObject : m_activeDOMObjects) { 195 195 if (!activeDOMObject->canSuspendForDocumentSuspension()) { … … 233 233 // An ASSERT_WITH_SECURITY_IMPLICATION or RELEASE_ASSERT will fire if this happens, but it's important to code 234 234 // suspend functions so it will not happen! 235 NoEventDispatchAssertion assertNoEventDispatch;235 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 236 236 for (auto* activeDOMObject : m_activeDOMObjects) 237 237 activeDOMObject->suspend(why); … … 262 262 // An ASSERT_WITH_SECURITY_IMPLICATION or RELEASE_ASSERT will fire if this happens, but it's important to code 263 263 // resume functions so it will not happen! 264 NoEventDispatchAssertion assertNoEventDispatch;264 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 265 265 for (auto* activeDOMObject : m_activeDOMObjects) 266 266 activeDOMObject->resume(); -
trunk/Source/WebCore/history/CachedPage.cpp
r223476 r224356 109 109 // Do not dispatch DOM events as their JavaScript listeners could cause the page to be put 110 110 // into the page cache before we have finished restoring it from the page cache. 111 NoEventDispatchAssertion noEventDispatchAssertion;111 NoEventDispatchAssertion::InMainThread noEventDispatchAssertion; 112 112 113 113 m_cachedMainFrame->open(); -
trunk/Source/WebCore/history/PageCache.cpp
r220734 r224356 424 424 425 425 // Make sure we no longer fire any JS events past this point. 426 NoEventDispatchAssertion assertNoEventDispatch;426 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 427 427 428 428 item.m_cachedPage = std::make_unique<CachedPage>(*page); -
trunk/Source/WebCore/page/LayoutContext.cpp
r224225 r224356 212 212 { 213 213 SetForScope<LayoutPhase> layoutPhase(m_layoutPhase, LayoutPhase::InRenderTreeLayout); 214 NoEventDispatchAssertion noEventDispatchAssertion;214 NoEventDispatchAssertion::InMainThread noEventDispatchAssertion; 215 215 SubtreeLayoutStateMaintainer subtreeLayoutStateMaintainer(subtreeLayoutRoot()); 216 216 RenderView::RepaintRegionAccumulator repaintRegionAccumulator(renderView()); -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r224265 r224356 2527 2527 if (frameElementAndViewPermitScroll(frameElementBase, frameView)) { 2528 2528 // If this assertion fires we need to protect the ownerElement from being destroyed. 2529 NoEventDispatchAssertion assertNoEventDispatch;2529 NoEventDispatchAssertion::InMainThread assertNoEventDispatch; 2530 2530 2531 2531 LayoutRect viewRect = frameView.visibleContentRect(LegacyIOSDocumentVisibleRect);
Note: See TracChangeset
for help on using the changeset viewer.