Bug 131210 - Fast-path for casting JS wrappers to JSElement.
Summary: Fast-path for casting JS wrappers to JSElement.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2014-04-03 21:12 PDT by Andreas Kling
Modified: 2014-04-03 21:43 PDT (History)
8 users (show)

See Also:


Attachments
Patch (13.96 KB, patch)
2014-04-03 21:12 PDT, Andreas Kling
benjamin: 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 2014-04-03 21:12:07 PDT
We should have a fast-path for casting JS wrappers to JSElement, too!
Comment 1 Andreas Kling 2014-04-03 21:12:33 PDT
Created attachment 228577 [details]
Patch
Comment 2 Benjamin Poulain 2014-04-03 21:16:20 PDT
Comment on attachment 228577 [details]
Patch

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

> Source/WebCore/bindings/js/JSElementCustom.h:38
> +    return value.asCell()->type() >= JSElementType ? JSC::jsCast<JSElement*>(value) : nullptr;

>= is a dangerous game.
Comment 3 Andreas Kling 2014-04-03 21:43:23 PDT
Committed r166765: <http://trac.webkit.org/changeset/166765>