Bug 142454 - JITThunks keeps finalized Weaks around, pinning WeakBlocks.
Summary: JITThunks keeps finalized Weaks around, pinning WeakBlocks.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2015-03-08 04:20 PDT by Andreas Kling
Modified: 2015-03-08 16:59 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (4.17 KB, patch)
2015-03-08 04:25 PDT, Andreas Kling
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2015-03-08 04:20:28 PDT
I'm seeing a bunch of WeakBlocks that are only kept alive by the host function Weak pointers in VM::jitStubs.
Comment 1 Andreas Kling 2015-03-08 04:25:16 PDT
Created attachment 248188 [details]
Proposed patch
Comment 2 Darin Adler 2015-03-08 10:45:39 PDT
Comment on attachment 248188 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=248188&action=review

> Source/JavaScriptCore/jit/JITThunks.cpp:81
> +    NativeExecutable* nativeExecutable = jsCast<NativeExecutable*>(handle.get().asCell());

I would use auto* here instead of NativeExecutable* here since the type is already named over on the right side of the line. Maybe use a reference here since this can’t be null?

> Source/JavaScriptCore/jit/JITThunks.h:48
> +class JITThunks final : public WeakHandleOwner {

How about using private inheritance instead of public? The new code seems to be all inside JITThunks member functions.
Comment 3 Andreas Kling 2015-03-08 16:59:38 PDT
Committed <https://trac.webkit.org/r181250>