[webkit-changes] [WebKit/WebKit] 4485bf: RELEASE_ASSERT(checkedPtrCountWithoutThreadCheck()...

Chris Dumez noreply at github.com
Mon Nov 4 22:00:51 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4485bf63af0c6b67940865b5f53c25cfbb50f1b0
      https://github.com/WebKit/WebKit/commit/4485bf63af0c6b67940865b5f53c25cfbb50f1b0
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-11-04 (Mon, 04 Nov 2024)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/dom/ScriptElement.cpp
    M Source/WebCore/dom/ScriptRunner.cpp
    M Source/WebCore/dom/ScriptRunner.h

  Log Message:
  -----------
  RELEASE_ASSERT(checkedPtrCountWithoutThreadCheck()) is failing for Windows Release builds
https://bugs.webkit.org/show_bug.cgi?id=282559

Reviewed by Ryosuke Niwa and Fujii Hironori.

Address the crash by making ScriptRunner ref-counted (since ScriptRunner can otherwise
get destroyed when its m_timer fires). The ScriptRunner forwards the ref-counting to its
owning Document.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::didBecomeCurrentDocumentInFrame):
(WebCore::Document::ensureScriptRunner):
(WebCore::Document::protectedScriptRunner):
(WebCore::Document::finishedParsing):
(WebCore::Document::suspendScheduledTasks):
(WebCore::Document::resumeScheduledTasks):
(WebCore::Document::checkedScriptRunner): Deleted.
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/ScriptElement.cpp:
(WebCore::ScriptElement::prepareScript):
* Source/WebCore/dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::ref const):
(WebCore::ScriptRunner::deref const):
* Source/WebCore/dom/ScriptRunner.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list