Bug 155154 - WeakBlock::visit() should check for a WeakHandleOwner before consulting mark bits.
Summary: WeakBlock::visit() should check for a WeakHandleOwner before consulting mark ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2016-03-07 19:13 PST by Andreas Kling
Modified: 2016-03-08 09:57 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.98 KB, patch)
2016-03-07 19:13 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2016-03-07 19:13:08 PST
Many WeakImpl's do not have a WeakHandleOwner, so WeakBlock::visit() is just wasting its time looking up the mark bits for its pointee.
Comment 1 Andreas Kling 2016-03-07 19:13:37 PST
Created attachment 273260 [details]
Patch
Comment 2 Darin Adler 2016-03-08 09:09:40 PST
Comment on attachment 273260 [details]
Patch

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

> Source/JavaScriptCore/heap/WeakBlock.cpp:121
> +        const JSValue& jsValue = weakImpl->jsValue();

The use of const JSValue& here seems peculiar. Why not just JSValue?
Comment 3 WebKit Commit Bot 2016-03-08 09:56:57 PST
Comment on attachment 273260 [details]
Patch

Clearing flags on attachment: 273260

Committed r197774: <http://trac.webkit.org/changeset/197774>
Comment 4 WebKit Commit Bot 2016-03-08 09:57:00 PST
All reviewed patches have been landed.  Closing bug.