DocumentOrderedMap::add should release assert that tree scopes match
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2017 08:54:42 +0000 (08:54 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2017 08:54:42 +0000 (08:54 +0000)
commit8ffdb557e2395bbca43a58853e39ac4c78fc4ce5
treecaadde0e979b78af00666b1864cf5fe05c7b68aa
parent0c277b6f3493dab1a4a383bb0e6fd66dfc7773f9
DocumentOrderedMap::add should release assert that tree scopes match
https://bugs.webkit.org/show_bug.cgi?id=178708

Reviewed by Antti Koivisto.

Assert that the tree scope of element matches the given tree scope instead of asserting that
element is in tree scope, and replaced the use of RELEASE_ASSERT by the newly added
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION to clarify the semantics of these assertions.

Also removed now redudnant early exits which would never execute due to release assertions.

* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/DocumentOrderedMap.cpp