[EnabledAtRuntime=Feature] static void blah(); should add/remove the method when Feature is enabled or disabled.
Created attachment 350088 [details] Patch
Created attachment 350129 [details] Patch
Comment on attachment 350129 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350129&action=review > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3658 > + my $globalObjectPtr = ($globalObjectIsParam? "&globalObject" : "globalObject()"); missing space before '?'. Also, I think we usually omit the parentheses. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3679 > + my $globalObjectPtr = ($globalObjectIsParam? "&globalObject" : "globalObject()"); Same comments as above. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:7199 > + push(@attributes, @{$interface->mapLike->attributes}) if $interface->mapLike; Could you clarify why maplike is unconditionally treated as runtime enabled? > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:7205 > + if ($attribute->extendedAttributes->{EnabledAtRuntime}) { Same comment as below. Should probably use NeedsRuntimeCheck() > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:7211 > + push(@operations, @{$interface->iterable->operations}) if IsKeyValueIterableInterface($interface); Could you clarify why iterable is unconditionally treated as runtime enabled? > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:7212 > + push(@operations, @{$interface->mapLike->operations}) if $interface->mapLike; ditto. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:7213 > + push(@operations, @{$interface->serializable->operations}) if $interface->serializable; ditto. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:7221 > + if ($operation->extendedAttributes->{EnabledAtRuntime}) { We normally do not special-case EnabledAtRuntime and instead rely on NeedsRuntimeCheck(). Also note that EnabledAtRuntime is kind of deprecated in favor of EnabledBySetting, unless you need multithreaded access. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:7293 > + my $runtimeEnableConditionalString = GenerateRuntimeEnableConditionalString($interface, $operationOrAttribute, "true"); GenerateRuntimeEnableConditionalString supports other things that EnabledAtRuntime. For e.g. it supports EnabledBySetting (which is preferred nowadays). Therefore, it is unfortunate that GetRuntimeEnabledStaticProperties() only returns EnabledAtRuntime things.
Created attachment 350161 [details] Patch
Comment on attachment 350161 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350161&action=review r=me > Source/WebCore/ChangeLog:6 > + Add support for EnabledAtRuntime to static methods in the JS bindings The description should come after... > Source/WebCore/ChangeLog:9 > + Reviewed by NOBODY (OOPS!). ... the reviewed by line.
Created attachment 350219 [details] Patch
Comment on attachment 350219 [details] Patch Clearing flags on attachment: 350219 Committed r236266: <https://trac.webkit.org/changeset/236266>
All reviewed patches have been landed. Closing bug.
<rdar://problem/44646048>