mirror of
https://github.com/servo/servo.git
synced 2025-07-31 03:00:29 +01:00
Replace the 'GlobalStaticData' free function by a 'new' static member function.
This commit is contained in:
parent
8f351cdc32
commit
bfddd1ec53
2 changed files with 7 additions and 5 deletions
|
@ -55,10 +55,12 @@ pub struct GlobalStaticData {
|
||||||
pub windowproxy_handler: WindowProxyHandler,
|
pub windowproxy_handler: WindowProxyHandler,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new GlobalStaticData.
|
impl GlobalStaticData {
|
||||||
pub fn GlobalStaticData() -> GlobalStaticData {
|
/// Creates a new GlobalStaticData.
|
||||||
GlobalStaticData {
|
pub fn new() -> GlobalStaticData {
|
||||||
windowproxy_handler: browsercontext::new_window_proxy_handler(),
|
GlobalStaticData {
|
||||||
|
windowproxy_handler: browsercontext::new_window_proxy_handler(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ impl Page {
|
||||||
constellation_chan: ConstellationChan,
|
constellation_chan: ConstellationChan,
|
||||||
js_context: Rc<Cx>) -> Page {
|
js_context: Rc<Cx>) -> Page {
|
||||||
let js_info = JSPageInfo {
|
let js_info = JSPageInfo {
|
||||||
dom_static: GlobalStaticData(),
|
dom_static: GlobalStaticData::new(),
|
||||||
js_context: js_context,
|
js_context: js_context,
|
||||||
};
|
};
|
||||||
let layout_rpc: Box<LayoutRPC> = {
|
let layout_rpc: Box<LayoutRPC> = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue