aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2016-07-02 13:51:17 -0400
committerCorey Farwell <coreyf@rwell.org>2016-07-02 16:43:39 -0400
commit22928f50ace78091bcb434c61e731663dbf3e625 (patch)
treee94536bc35887e3f4a7c9e5dd5f7dc2d271b415f /components/script/dom/bindings/codegen/CodegenRust.py
parent307844a8c17aedc369388baf4d98b0f82c3b695b (diff)
downloadservo-22928f50ace78091bcb434c61e731663dbf3e625.tar.gz
servo-22928f50ace78091bcb434c61e731663dbf3e625.zip
Refactor `util::prefs` operations to be methods on static struct.
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 76aab6b9b53..ac53221cb8a 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -2250,7 +2250,7 @@ class CGConstructorEnabled(CGAbstractMethod):
pref = iface.getExtendedAttribute("Pref")
if pref:
assert isinstance(pref, list) and len(pref) == 1
- conditions.append('prefs::get_pref("%s").as_boolean().unwrap_or(false)' % pref[0])
+ conditions.append('PREFS.get("%s").as_boolean().unwrap_or(false)' % pref[0])
func = iface.getExtendedAttribute("Func")
if func:
assert isinstance(func, list) and len(func) == 1
@@ -5605,7 +5605,7 @@ class CGBindingRoot(CGThing):
'dom::browsingcontext::BrowsingContext',
'mem::heap_size_of_raw_self_and_children',
'libc',
- 'util::prefs',
+ 'util::prefs::PREFS',
'script_runtime::{store_panic_result, maybe_take_panic_result}',
'std::borrow::ToOwned',
'std::cmp',