Replace the 'GlobalStaticData' free function by a 'new' static member function.

This commit is contained in:
Ms2ger 2015-01-29 18:27:31 +01:00
parent 8f351cdc32
commit bfddd1ec53
2 changed files with 7 additions and 5 deletions

View file

@ -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(),
}
}
}

View file

@ -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> = {