REGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Dec 2018 00:28:44 +0000 (00:28 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Dec 2018 00:28:44 +0000 (00:28 +0000)
commitd1ca937f69eeff3ac49d9988277426c1a88b17f6
tree3a2e70b4b87e20dde40de2acd7fab0b5b7f02162
parent0cc4b98edb42fb948a135e7a000b6f8352899939
REGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
TestWebKitAPI.QuickLook.LegacyQuickLookContent
https://bugs.webkit.org/show_bug.cgi?id=192859
<rdar://problem/46887237>

Reviewed by Antti Koivisto.

After r239353, ScriptDisallowedScope::InMainThread::isScriptAllowed() may return false when the web thread
is inside a delegate callback even when there is a ScriptDisallowedScope defined.

Replace the existign debug assertions which assert !ScriptDisallowedScope::InMainThread::isScriptAllowed()
by a newly added ScriptDisallowedScope::InMainThread::hasDisallowedScope to avoid hitting this assertion.

Tests: TestWebKitAPI.QuickLook.LegacyQuickLookContent

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyChildNodeInserted):
(WebCore::notifyChildNodeRemoved):
* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
* dom/ScriptDisallowedScope.h:
(WebCore::ScriptDisallowedScope::InMainThread::hasDisallowedScope):
* html/HTMLFormElement.cpp:
(WebCore:: const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNodeAlgorithms.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/ScriptDisallowedScope.h
Source/WebCore/html/HTMLFormElement.cpp