Bug 131210

Summary: Fast-path for casting JS wrappers to JSElement.
Product: WebKit Reporter: Andreas Kling <kling>
Component: BindingsAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cgarcia, cmarcelo, commit-queue, esprehn+autocc, kangil.han, kling, kondapallykalyan
Priority: P2 Keywords: Performance
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch benjamin: review+

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>