⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 258613 in webkit


Ignore:
Timestamp:
Mar 17, 2020, 5:12:47 PM (6 years ago)
Author:
Chris Dumez
Message:

REGRESSION: [ macOS wk1 ] ASSERTION FAILED: _notifications.contains(notificationID) imported/w3c/web-platform-tests/notifications/constructor-basic.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=207307
<rdar://problem/59206964>

Reviewed by Alex Christensen.

Source/WebKitLegacy/mac:

  • WebView/WebNotification.h:
  • WebView/WebNotification.mm:

(-[WebNotification finalize]):

Tools:

When [MockWebNotificationProvider reset] was called at the end of the test, it would remove all
notifications from the map but not tell WebCore that the notification were discarded. As a result,
WebCore would later tell the MockWebNotificationProvider to cancel the notification but this
notification would no longer be in the map, causing us to hit an assertion in debug.

To address the issue, we now call Notification::finalize() in [MockWebNotificationProvider reset]
to let WebCore know the notification was discarded. This is similar to what is already done for
WebKit2 in WebNotificationManager::clearNotifications().

  • DumpRenderTree/mac/MockWebNotificationProvider.mm:

(-[MockWebNotificationProvider reset]):

LayoutTests:

Add test coverage.

  • http/wpt/notifications/constructor-basic-bfcache-expected.txt: Added.
  • http/wpt/notifications/constructor-basic-bfcache.html: Added.
  • platform/mac/TestExpectations:
Location:
trunk
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r258609 r258613  
     12020-03-17  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION: [ macOS wk1 ] ASSERTION FAILED: _notifications.contains(notificationID) imported/w3c/web-platform-tests/notifications/constructor-basic.html is flaky crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=207307
     5        <rdar://problem/59206964>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Add test coverage.
     10
     11        * http/wpt/notifications/constructor-basic-bfcache-expected.txt: Added.
     12        * http/wpt/notifications/constructor-basic-bfcache.html: Added.
     13        * platform/mac/TestExpectations:
     14
    1152020-03-17  Chris Fleizach  <cfleizach@apple.com>
    216
  • trunk/LayoutTests/platform/mac/TestExpectations

    r258572 r258613  
    19641964webkit.org/b/207333 imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer.html [ Pass Failure ]
    19651965
    1966 webkit.org/b/207307 imported/w3c/web-platform-tests/notifications/constructor-basic.html [ Pass Crash ]
    1967 
    19681966webkit.org/b/112939 fast/performance/performance-now-timestamps.html [ Pass Failure ]
    19691967
  • trunk/LayoutTests/platform/win/TestExpectations

    r258576 r258613  
    198198# TODO This port doesn't support Notifications.
    199199http/tests/notifications/ [ Skip ]
     200http/wpt/notifications/ [ Skip ]
    200201fast/history/page-cache-notification-showing.html [ Skip ]
    201202fast/history/page-cache-notification-suspendable.html [ Skip ]
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r258549 r258613  
     12020-03-17  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION: [ macOS wk1 ] ASSERTION FAILED: _notifications.contains(notificationID) imported/w3c/web-platform-tests/notifications/constructor-basic.html is flaky crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=207307
     5        <rdar://problem/59206964>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * WebView/WebNotification.h:
     10        * WebView/WebNotification.mm:
     11        (-[WebNotification finalize]):
     12
    1132020-03-17  Commit Queue  <commit-queue@webkit.org>
    214
  • trunk/Source/WebKitLegacy/mac/WebView/WebNotification.h

    r215685 r258613  
    5151- (void)dispatchClickEvent;
    5252- (void)dispatchErrorEvent;
     53- (void)finalize;
    5354
    5455@end
  • trunk/Source/WebKitLegacy/mac/WebView/WebNotification.mm

    r254241 r258613  
    194194}
    195195
    196 @end
    197 
     196- (void)finalize
     197{
     198#if ENABLE(NOTIFICATIONS)
     199    core(self)->finalize();
     200#endif
     201}
     202
     203@end
     204
  • trunk/Tools/ChangeLog

    r258612 r258613  
     12020-03-17  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION: [ macOS wk1 ] ASSERTION FAILED: _notifications.contains(notificationID) imported/w3c/web-platform-tests/notifications/constructor-basic.html is flaky crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=207307
     5        <rdar://problem/59206964>
     6
     7        Reviewed by Alex Christensen.
     8
     9        When [MockWebNotificationProvider reset] was called at the end of the test, it would remove all
     10        notifications from the map but not tell WebCore that the notification were discarded. As a result,
     11        WebCore would later tell the MockWebNotificationProvider to cancel the notification but this
     12        notification would no longer be in the map, causing us to hit an assertion in debug.
     13
     14        To address the issue, we now call Notification::finalize() in [MockWebNotificationProvider reset]
     15        to let WebCore know the notification was discarded. This is similar to what is already done for
     16        WebKit2 in WebNotificationManager::clearNotifications().
     17
     18        * DumpRenderTree/mac/MockWebNotificationProvider.mm:
     19        (-[MockWebNotificationProvider reset]):
     20
    1212020-03-17  Don Olmstead  <don.olmstead@sony.com>
    222
  • trunk/Tools/DumpRenderTree/mac/MockWebNotificationProvider.mm

    r234685 r258613  
    144144- (void)reset
    145145{
    146     _notifications.clear();
     146    auto notifications = WTFMove(_notifications);
     147    for (auto notification : notifications.values())
     148        [notification finalize];
     149
    147150    _notificationViewMap.clear();
    148151    [self removeAllWebNotificationPermissions];
Note: See TracChangeset for help on using the changeset viewer.