aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-29 18:27:31 +0100
committerMs2ger <ms2ger@gmail.com>2015-01-29 18:27:31 +0100
commitbfddd1ec53e44621a268922d5ddbde873f811b6c (patch)
tree5db504972e4c8f2ec993842950d4732c41a0624b
parent8f351cdc3209c0be2e02b9d08fef502eb7aa04ec (diff)
downloadservo-bfddd1ec53e44621a268922d5ddbde873f811b6c.tar.gz
servo-bfddd1ec53e44621a268922d5ddbde873f811b6c.zip
Replace the 'GlobalStaticData' free function by a 'new' static member function.
-rw-r--r--components/script/dom/bindings/utils.rs10
-rw-r--r--components/script/page.rs2
2 files changed, 7 insertions, 5 deletions
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs
index 2819018cf27..df7afd7de09 100644
--- a/components/script/dom/bindings/utils.rs
+++ b/components/script/dom/bindings/utils.rs
@@ -55,10 +55,12 @@ pub struct GlobalStaticData {
pub windowproxy_handler: WindowProxyHandler,
}
-/// Creates a new GlobalStaticData.
-pub fn GlobalStaticData() -> GlobalStaticData {
- GlobalStaticData {
- windowproxy_handler: browsercontext::new_window_proxy_handler(),
+impl GlobalStaticData {
+ /// Creates a new GlobalStaticData.
+ pub fn new() -> GlobalStaticData {
+ GlobalStaticData {
+ windowproxy_handler: browsercontext::new_window_proxy_handler(),
+ }
}
}
diff --git a/components/script/page.rs b/components/script/page.rs
index 2433f03f2c5..b9dce92fac5 100644
--- a/components/script/page.rs
+++ b/components/script/page.rs
@@ -133,7 +133,7 @@ impl Page {
constellation_chan: ConstellationChan,
js_context: Rc<Cx>) -> Page {
let js_info = JSPageInfo {
- dom_static: GlobalStaticData(),
+ dom_static: GlobalStaticData::new(),
js_context: js_context,
};
let layout_rpc: Box<LayoutRPC> = {