mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Store proxy handlers in a static array rather than a hashtable per window.
This commit is contained in:
parent
f47b66b0c1
commit
fd167f8922
4 changed files with 85 additions and 38 deletions
|
@ -11,10 +11,9 @@ use dom::browsercontext;
|
|||
use dom::window;
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
use std::collections::hashmap::HashMap;
|
||||
use libc;
|
||||
use libc::c_uint;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::cell::Cell;
|
||||
use std::mem;
|
||||
use std::cmp::PartialEq;
|
||||
use std::ptr;
|
||||
|
@ -52,13 +51,11 @@ use js;
|
|||
#[allow(raw_pointer_deriving)]
|
||||
#[deriving(Encodable)]
|
||||
pub struct GlobalStaticData {
|
||||
pub proxy_handlers: Untraceable<RefCell<HashMap<uint, *libc::c_void>>>,
|
||||
pub windowproxy_handler: Untraceable<*libc::c_void>,
|
||||
}
|
||||
|
||||
pub fn GlobalStaticData() -> GlobalStaticData {
|
||||
GlobalStaticData {
|
||||
proxy_handlers: Untraceable::new(RefCell::new(HashMap::new())),
|
||||
windowproxy_handler: Untraceable::new(browsercontext::new_window_proxy_handler()),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue