[webkit-changes] [WebKit/WebKit] 4ee884: [JSC] Fix reportExtraMemoryAllocated uses when res...

Commit Queue noreply at github.com
Wed Dec 20 14:31:00 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4ee884c7fd4bfd72b25f388e7fca97e6ffe241d9
      https://github.com/WebKit/WebKit/commit/4ee884c7fd4bfd72b25f388e7fca97e6ffe241d9
  Author: Yijia Huang <yijia_huang at apple.com>
  Date:   2023-12-20 (Wed, 20 Dec 2023)

  Changed paths:
    A JSTests/stress/re-enter-resolve-rope-string.js
    M Source/JavaScriptCore/heap/Heap.h
    M Source/JavaScriptCore/runtime/JSString.cpp
    M Source/JavaScriptCore/runtime/JSStringInlines.h

  Log Message:
  -----------
  [JSC] Fix reportExtraMemoryAllocated uses when resolving rope strings
https://bugs.webkit.org/show_bug.cgi?id=264016
rdar://117639567

Reviewed by Yusuke Suzuki.

Heap::reportExtraMemoryAllocated may trigger JSRopeString::resolveRope.
If this API needs to be used when resolving a rope string, then we should
make sure to call this API after the rope string is completely resolved.

* Source/JavaScriptCore/heap/Heap.h:
* Source/JavaScriptCore/runtime/JSString.cpp:
(JSC::JSRopeString::resolveRopeToAtomString const):
(JSC::JSRopeString::resolveRopeWithFunction const):
* Source/JavaScriptCore/runtime/JSStringInlines.h:
(JSC::jsAtomString):

Originally-landed-as: 267815.494 at safari-7617-branch (43754f3837df). rdar://119598160
Canonical link: https://commits.webkit.org/272382@main




More information about the webkit-changes mailing list