Bug 52011

Summary: JSC bindings should use RuntimeEnabledFeatures
Product: WebKit Reporter: Joe Mason <joenotcharles>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: REOPENED ---    
Severity: Enhancement CC: abarth, cdumez, cmarcelo, darin, dbates, ddkilzer, dw.im, jorlow, ksakamoto, rniwa, robert
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 116147    
Bug Blocks:    

Description Joe Mason 2011-01-06 12:58:37 PST
Only the V8 bindings generate code to enable/disable Javascript features that have the EnabledAtRuntime attribute, even though the RuntimeEnabledFeatures class is in bindings/generic so it's available to JSC.  This would allow attributes to be completely removed if they are disabled (simply returning "undefined" is not good enough because they will still be visible in iteration).

This needs at least:

- code added to CodeGeneratorJS.pm to parallel that in CodeGeneratorV8.pm that checks EnabledAtRuntime (or better yet move these checks 
into common helpers)
- possibly added to the other CodeGenerator scripts as well?
- existing uses of RuntimeEnabledFeatures that are wrapped in "#if USE(V8)" need to be audited to see if they should now be unconditional
- RuntimeEnabledFeatures needs to be added to the build for all platforms using JSC
Comment 1 David Kilzer (:ddkilzer) 2012-10-18 11:51:38 PDT
<rdar://problem/10155019>
Comment 2 Kent Tamura 2012-11-28 21:45:40 PST
*** Bug 91199 has been marked as a duplicate of this bug. ***
Comment 3 Ryosuke Niwa 2013-05-15 09:19:55 PDT

*** This bug has been marked as a duplicate of bug 116147 ***
Comment 4 Chris Dumez 2013-05-15 09:32:08 PDT
(In reply to comment #3)
> 
> *** This bug has been marked as a duplicate of bug 116147 ***

Actually, I think we can keep the other one open make add a dependency. My patch only adds support for global constructors. Work will still be needed to extend that to regular attributes and operations.
Comment 5 Ryosuke Niwa 2013-05-15 09:35:45 PDT
Okay.