Changeset 263564 in webkit


Ignore:
Timestamp:
Jun 26, 2020 9:44:31 AM (4 years ago)
Author:
Jack Lee
Message:

ASSERTION FAILED: (it != m_map.end()) in TreeScopeOrderedMap::remove
https://bugs.webkit.org/show_bug.cgi?id=213611
<rdar://problem/64493506>

Reviewed by Geoffrey Garen.

Source/WebCore:

In function HTMLImageElement::parseAttribute(), empty name attribute is considered valid
which makes the function skip handling of subsequent name changes. Modified the check of
name attribute so only non-empty name is considered valid. This code change is to match
<https://trac.webkit.org/changeset/262360>.

Test: fast/images/img-change-name-assert.html

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::parseAttribute):

LayoutTests:

Added a regression test for the crash.

  • fast/images/img-change-name-assert-expected.txt: Added.
  • fast/images/img-change-name-assert.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r263560 r263564  
     12020-06-26  Jack Lee  <shihchieh_lee@apple.com>
     2
     3        ASSERTION FAILED: (it != m_map.end()) in TreeScopeOrderedMap::remove
     4        https://bugs.webkit.org/show_bug.cgi?id=213611
     5        <rdar://problem/64493506>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Added a regression test for the crash.
     10
     11        * fast/images/img-change-name-assert-expected.txt: Added.
     12        * fast/images/img-change-name-assert.html: Added.
     13
    1142020-06-26  Karl Rackler  <rackler@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r263563 r263564  
     12020-06-26  Jack Lee  <shihchieh_lee@apple.com>
     2
     3        ASSERTION FAILED: (it != m_map.end()) in TreeScopeOrderedMap::remove
     4        https://bugs.webkit.org/show_bug.cgi?id=213611
     5        <rdar://problem/64493506>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        In function HTMLImageElement::parseAttribute(), empty name attribute is considered valid
     10        which makes the function skip handling of subsequent name changes. Modified the check of
     11        name attribute so only non-empty name is considered valid. This code change is to match
     12        <https://trac.webkit.org/changeset/262360>.
     13
     14        Test: fast/images/img-change-name-assert.html
     15
     16        * html/HTMLImageElement.cpp:
     17        (WebCore::HTMLImageElement::parseAttribute):
     18
    1192020-06-26  Sihui Liu  <sihui_liu@apple.com>
    220
  • trunk/Source/WebCore/html/HTMLImageElement.cpp

    r263350 r263564  
    296296    } else {
    297297        if (name == nameAttr) {
    298             bool willHaveName = !value.isNull();
     298            bool willHaveName = !value.isEmpty();
    299299            if (m_hadNameBeforeAttributeChanged != willHaveName && isConnected() && !isInShadowTree() && is<HTMLDocument>(document())) {
    300300                HTMLDocument& document = downcast<HTMLDocument>(this->document());
Note: See TracChangeset for help on using the changeset viewer.