[webkit-changes] [WebKit/WebKit] 24db74: Removing reportingScope observers in destructor to...

Commit Queue noreply at github.com
Tue Nov 22 05:56:07 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 24db74d224090552034da32f80359ebc6c12617c
      https://github.com/WebKit/WebKit/commit/24db74d224090552034da32f80359ebc6c12617c
  Author: Angela Izquierdo Garcia <aizquierdogarcia at apple.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    A LayoutTests/http/tests/workers/reportingObserverNonNull-expected.txt
    A LayoutTests/http/tests/workers/reportingObserverNonNull.html
    M Source/WebCore/workers/WorkerGlobalScope.cpp

  Log Message:
  -----------
  Removing reportingScope observers in destructor to fix nullptr
https://bugs.webkit.org/show_bug.cgi?id=247677#c0
rdar://102142833

The issue is that when doing in ReportingObserver::disconnect, there are pointers that are already null since the WorkerGlobalScope object is being deleted in the process so any reference to its ReportingObserver objects
might not be valid. That is why when destroying it, it is also necessary to remove the corresponding ReportingObserver objects.

Reviewed by Youenn Fablet.

* Source/WebCore/workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::removeAllEventListeners):

Canonical link: https://commits.webkit.org/256932@main




More information about the webkit-changes mailing list