diff options
author | Josh Matthews <josh@joshmatthews.net> | 2020-07-09 20:01:01 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2020-07-09 23:22:48 -0400 |
commit | aa80f9139909b451d434093e0ef38266f56bda3e (patch) | |
tree | 7ffd4fd4729549d4dfbba1541ecba81dfa1b538a /components/script/dom/bindings/codegen | |
parent | 714acb942c8cc036eb9442401987d6fba6521a04 (diff) | |
download | servo-aa80f9139909b451d434093e0ef38266f56bda3e.tar.gz servo-aa80f9139909b451d434093e0ef38266f56bda3e.zip |
dom: Use pref macro for IDL conditional guards.
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index b078a8dac8a..c80fec57b5b 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -2662,7 +2662,7 @@ class CGConstructorEnabled(CGAbstractMethod): pref = iface.getExtendedAttribute("Pref") if pref: assert isinstance(pref, list) and len(pref) == 1 - conditions.append('prefs::pref_map().get("%s").as_bool().unwrap_or(false)' % pref[0]) + conditions.append('pref!(%s)' % pref[0]) func = iface.getExtendedAttribute("Func") if func: |