Bug 155154

Summary: WeakBlock::visit() should check for a WeakHandleOwner before consulting mark bits.
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Severity: Normal CC: commit-queue, keith_miller, mark.lam, msaboff, sbarati
Priority: P2 Keywords: Performance
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch none

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]
Comment 2 Darin Adler 2016-03-08 09:09:40 PST
Comment on attachment 273260 [details]

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]

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.