Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7e81a6ff2e0599dcbcbb42754966649c16678d23
https://github.com/WebKit/WebKit/commit/7e81a6ff2e0599dcbcbb42754966649c16678d23
Author: Keith Miller <[email protected]>
Date: 2025-06-05 (Thu, 05 Jun 2025)
Changed paths:
M Source/JavaScriptCore/bytecode/ExpressionInfo.cpp
M Source/JavaScriptCore/bytecode/ExpressionInfo.h
M Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
M Source/JavaScriptCore/runtime/CachedTypes.cpp
M Source/WTF/wtf/MallocPtr.h
Log Message:
-----------
ExpressionInfo should be retained with a unique_ptr rather than a MallocPtr.
https://bugs.webkit.org/show_bug.cgi?id=294060
rdar://152272167
Reviewed by Yusuke Suzuki.
Right now UnlinkedCodeBlock's retain the ExpressionInfo they need for stack
traces via a MallocPtr.
MallocPtr's don't run the destructors of the types they point to before freeing
them. For ExpressionInfo's
this is mostly fine except for the HashMap in ExpressionInfo, which ends up
being leaked.
This patch chanegs UnlinkedCodeBlock to retain ExpressionInfo using a
unique_ptr instead. This is a little
tricky because ExpressionInfo has a trailing array of bytes so we have to
placement `new` it. In the future
we should consider making ExpressionInfo a TrailingArray type, although it's a
little unclear how to do so.
* Source/WTF/wtf/MallocPtr.h:
Mark that this class shouldn't be used.
Canonical link: https://commits.webkit.org/295872@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes