mirror of
https://github.com/servo/servo.git
synced 2025-07-30 10:40:27 +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,
|
||||
}
|
||||
|
||||
/// 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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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> = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue