Index: third_party/WebKit/Source/bindings/scripts/v8_utilities.py |
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py |
index 4fb4ea4802657d1cb2aa4ca52c496aa872abab8b..a0da30569c88cac1334d7601ffb600fb033346f6 100644 |
--- a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py |
+++ b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py |
@@ -112,6 +112,11 @@ def uncapitalize(name): |
return name[0].lower() + name[1:] |
+def runtime_enabled_function(name): |
Yuki
2017/01/13 02:38:37
I'm uneasy with this name because "runtime enabled
peria
2017/01/13 05:54:26
I'll make a follow up CL.
But I think the prefix "
|
+ """Returns a function call of a runtime enabled feature.""" |
+ return 'RuntimeEnabledFeatures::%sEnabled()' % uncapitalize(name) |
+ |
+ |
def unique_by(dict_list, key): |
"""Returns elements from a list of dictionaries with unique values for the named key.""" |
keys_seen = set() |
@@ -294,8 +299,7 @@ class ExposureSet: |
exposed = ('executionContext->%s()' % |
EXPOSED_EXECUTION_CONTEXT_METHOD[exposure.exposed]) |
if exposure.runtime_enabled is not None: |
- runtime_enabled = ('RuntimeEnabledFeatures::%sEnabled()' % |
- uncapitalize(exposure.runtime_enabled)) |
+ runtime_enabled = (runtime_enabled_function(exposure.runtime_enabled)) |
return '({0} && {1})'.format(exposed, runtime_enabled) |
return exposed |