aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index df156fb0eb7..ea21989178b 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -2586,7 +2586,7 @@ class CGConstructorEnabled(CGAbstractMethod):
pref = iface.getExtendedAttribute("Pref")
if pref:
assert isinstance(pref, list) and len(pref) == 1
- conditions.append('PREFS.get("%s").as_boolean().unwrap_or(false)' % pref[0])
+ conditions.append('prefs::pref_map().get("%s").as_bool().unwrap_or(false)' % pref[0])
func = iface.getExtendedAttribute("Func")
if func:
@@ -5977,7 +5977,8 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries
'crate::dom::globalscope::GlobalScope',
'crate::mem::malloc_size_of_including_raw_self',
'libc',
- 'servo_config::prefs::PREFS',
+ 'servo_config::pref',
+ 'servo_config::prefs',
'std::borrow::ToOwned',
'std::cmp',
'std::mem',