servo: Merge #5661 - Stop using int/uint in CEF (from Ms2ger:cef); r=jdm
authorMs2ger <ms2ger@gmail.com>
Mon, 13 Apr 2015 09:17:44 -0500
changeset 382806 9480d898333d4b1e533d537bc39eeac8a21e115f
parent 382805 dd6e5c917c78bf2bb9c26b6287f9bfe50cc9c7c0
child 382807 734ba476f8782f02055393511e0c403623316daa
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
servo: Merge #5661 - Stop using int/uint in CEF (from Ms2ger:cef); r=jdm Source-Repo: https://github.com/servo/servo Source-Revision: c42c2ae9b57b5960ce617e5b4c0ab75959e46957
servo/ports/cef/browser.rs
servo/ports/cef/command_line.rs
servo/ports/cef/core.rs
servo/ports/cef/eutil.rs
servo/ports/cef/interfaces/cef_app.rs
servo/ports/cef/interfaces/cef_auth_callback.rs
servo/ports/cef/interfaces/cef_browser.rs
servo/ports/cef/interfaces/cef_browser_process_handler.rs
servo/ports/cef/interfaces/cef_callback.rs
servo/ports/cef/interfaces/cef_client.rs
servo/ports/cef/interfaces/cef_command_line.rs
servo/ports/cef/interfaces/cef_context_menu_handler.rs
servo/ports/cef/interfaces/cef_cookie.rs
servo/ports/cef/interfaces/cef_dialog_handler.rs
servo/ports/cef/interfaces/cef_display_handler.rs
servo/ports/cef/interfaces/cef_dom.rs
servo/ports/cef/interfaces/cef_download_handler.rs
servo/ports/cef/interfaces/cef_download_item.rs
servo/ports/cef/interfaces/cef_drag_data.rs
servo/ports/cef/interfaces/cef_drag_handler.rs
servo/ports/cef/interfaces/cef_focus_handler.rs
servo/ports/cef/interfaces/cef_frame.rs
servo/ports/cef/interfaces/cef_geolocation.rs
servo/ports/cef/interfaces/cef_geolocation_handler.rs
servo/ports/cef/interfaces/cef_jsdialog_handler.rs
servo/ports/cef/interfaces/cef_keyboard_handler.rs
servo/ports/cef/interfaces/cef_life_span_handler.rs
servo/ports/cef/interfaces/cef_load_handler.rs
servo/ports/cef/interfaces/cef_menu_model.rs
servo/ports/cef/interfaces/cef_print_handler.rs
servo/ports/cef/interfaces/cef_print_settings.rs
servo/ports/cef/interfaces/cef_process_message.rs
servo/ports/cef/interfaces/cef_render_handler.rs
servo/ports/cef/interfaces/cef_render_process_handler.rs
servo/ports/cef/interfaces/cef_request.rs
servo/ports/cef/interfaces/cef_request_context.rs
servo/ports/cef/interfaces/cef_request_context_handler.rs
servo/ports/cef/interfaces/cef_request_handler.rs
servo/ports/cef/interfaces/cef_resource_bundle_handler.rs
servo/ports/cef/interfaces/cef_resource_handler.rs
servo/ports/cef/interfaces/cef_response.rs
servo/ports/cef/interfaces/cef_scheme.rs
servo/ports/cef/interfaces/cef_stream.rs
servo/ports/cef/interfaces/cef_string_visitor.rs
servo/ports/cef/interfaces/cef_task.rs
servo/ports/cef/interfaces/cef_trace.rs
servo/ports/cef/interfaces/cef_urlrequest.rs
servo/ports/cef/interfaces/cef_v8.rs
servo/ports/cef/interfaces/cef_values.rs
servo/ports/cef/interfaces/cef_web_plugin.rs
servo/ports/cef/interfaces/cef_xml_reader.rs
servo/ports/cef/interfaces/cef_zip_reader.rs
servo/ports/cef/lib.rs
servo/ports/cef/macros.rs
servo/ports/cef/string.rs
servo/ports/cef/string_list.rs
servo/ports/cef/string_map.rs
servo/ports/cef/string_multimap.rs
servo/ports/cef/wrappers.rs
--- a/servo/ports/cef/browser.rs
+++ b/servo/ports/cef/browser.rs
@@ -81,17 +81,17 @@ pub struct ServoCefBrowser {
     pub frame: CefFrame,
     /// A reference to the browser's host.
     pub host: CefBrowserHost,
     /// A reference to the browser client.
     pub client: CefClient,
     /// Whether the on-created callback has fired yet.
     pub callback_executed: Cell<bool>,
 
-    id: int,
+    id: isize,
     servo_browser: RefCell<ServoBrowser>,
     message_queue: RefCell<Vec<WindowEvent>>,
 }
 
 impl ServoCefBrowser {
     pub fn new(window_info: &cef_window_info_t, client: CefClient) -> ServoCefBrowser {
         let frame = ServoCefFrame::new().as_cef_interface();
         let host = ServoCefBrowserHost::new(client.clone()).as_cef_interface();
--- a/servo/ports/cef/command_line.rs
+++ b/servo/ports/cef/command_line.rs
@@ -28,18 +28,18 @@ fn command_line_new() -> *mut command_li
         (*cl).cl.base.size = mem::size_of::<cef_command_line_t>() as size_t;
         cl
     }
 }
 
 pub fn command_line_init(argc: c_int, argv: *const *const u8) {
     unsafe {
         let mut a: Vec<String> = vec!();
-        for i in 0u..(argc as uint) {
-            let slice = ffi::CStr::from_ptr(*argv.offset(i as int) as *const c_char);
+        for i in 0..(argc as usize) {
+            let slice = ffi::CStr::from_ptr(*argv.offset(i as isize) as *const c_char);
             let s = str::from_utf8(slice.to_bytes()).unwrap();
             a.push(String::from_str(s));
         }
         let cl = command_line_new();
         (*cl).argc = argc;
         (*cl).argv = a;
         (*cl).cl.get_switch_value = Some(command_line_get_switch_value as extern "C" fn(*mut cef_command_line_t, *const cef_string_t) -> cef_string_userfree_t);
         GLOBAL_CMDLINE = Some(cl);
--- a/servo/ports/cef/core.rs
+++ b/servo/ports/cef/core.rs
@@ -8,17 +8,17 @@ use types::{cef_main_args_t, cef_setting
 
 use libc::{c_char, c_int, c_void};
 use util::opts;
 use std::borrow::ToOwned;
 use std::ffi;
 use std::str;
 use browser;
 
-const MAX_RENDERING_THREADS: uint = 128;
+const MAX_RENDERING_THREADS: usize = 128;
 
 // TODO(pcwalton): Get the home page via the CEF API.
 static HOME_URL: &'static str = "http://s27.postimg.org/vqbtrolyr/servo.jpg";
 
 static CEF_API_HASH_UNIVERSAL: &'static [u8] = b"8efd129f4afc344bd04b2feb7f73a149b6c4e27f\0";
 #[cfg(target_os="windows")]
 static CEF_API_HASH_PLATFORM: &'static [u8] = b"5c7f3e50ff5265985d11dc1a466513e25748bedd\0";
 #[cfg(target_os="macos")]
@@ -55,22 +55,22 @@ pub extern "C" fn cef_initialize(args: *
                     if !handler.is_null() {
                         (*handler).on_context_initialized.map(|hcb| hcb(handler));
                     }
             });
         }
     }
 
     let rendering_threads = unsafe {
-        if ((*settings).rendering_threads as uint) < 1 {
+        if ((*settings).rendering_threads as usize) < 1 {
             1
-        } else if (*settings).rendering_threads as uint > MAX_RENDERING_THREADS {
+        } else if (*settings).rendering_threads as usize > MAX_RENDERING_THREADS {
             MAX_RENDERING_THREADS
         } else {
-            (*settings).rendering_threads as uint
+            (*settings).rendering_threads as usize
         }
     };
 
     let mut temp_opts = opts::default_opts();
     temp_opts.url = HOME_URL.to_owned();
     temp_opts.paint_threads = rendering_threads;
     temp_opts.layout_threads = rendering_threads;
     temp_opts.headless = false;
--- a/servo/ports/cef/eutil.rs
+++ b/servo/ports/cef/eutil.rs
@@ -14,17 +14,17 @@ use std::str;
 /// FIXME(pcwalton): This is currently unsafe. I think the right way to make this safe is to (a)
 /// forbid more than one Rust implementation of a given interface (easy to do by manufacturing an
 /// impl that will conflict if there is more than one) and then (b) add a dynamic check to make
 /// sure the `release` for the object is equal to `servo_release`.
 pub trait Downcast<Class> {
     fn downcast(&self) -> &Class;
 }
 
-pub fn slice_to_str<F>(s: *const u8, l: uint, f: F) -> c_int where F: FnOnce(&str) -> c_int {
+pub fn slice_to_str<F>(s: *const u8, l: usize, f: F) -> c_int where F: FnOnce(&str) -> c_int {
     unsafe {
         let s = slice::from_raw_parts(s, l);
         str::from_utf8(s).map(f).unwrap_or(0)
     }
 }
 
 /// Creates a new raw CEF object of the given type and sets up its reference counting machinery.
 /// All fields are initialized to zero. It is the caller's responsibility to ensure that the given
@@ -36,19 +36,19 @@ pub unsafe fn create_cef_object<Base,Ext
     (*object).add_ref = Some(servo_add_ref as extern "C" fn(*mut cef_base_t) -> c_int);
     (*object).release = Some(servo_release as extern "C" fn(*mut cef_base_t) -> c_int);
     *ref_count(object) = 1;
     object as *mut Base
 }
 
 /// Returns a pointer to the Servo-specific reference count for the given object. This only works
 /// on objects that Servo created!
-unsafe fn ref_count(object: *mut cef_base_t) -> *mut uint {
+unsafe fn ref_count(object: *mut cef_base_t) -> *mut usize {
     // The reference count should be the first field of the extra data.
-    (object as *mut u8).offset((*object).size as int) as *mut uint
+    (object as *mut u8).offset((*object).size as isize) as *mut usize
 }
 
 /// Increments the reference count on a CEF object. This only works on objects that Servo created!
 extern "C" fn servo_add_ref(object: *mut cef_base_t) -> c_int {
     unsafe {
         let count = ref_count(object);
         *count += 1;
         *count as c_int
--- a/servo/ports/cef/interfaces/cef_app.rs
+++ b/servo/ports/cef/interfaces/cef_app.rs
@@ -101,17 +101,17 @@ pub struct _cef_app_t {
   // function is called on the render process main thread.
   //
   pub get_render_process_handler: Option<extern "C" fn(
       this: *mut cef_app_t) -> *mut interfaces::cef_render_process_handler_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_app_t = _cef_app_t;
--- a/servo/ports/cef/interfaces/cef_auth_callback.rs
+++ b/servo/ports/cef/interfaces/cef_auth_callback.rs
@@ -66,17 +66,17 @@ pub struct _cef_auth_callback_t {
   //
   // Cancel the authentication request.
   //
   pub cancel: Option<extern "C" fn(this: *mut cef_auth_callback_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_auth_callback_t = _cef_auth_callback_t;
--- a/servo/ports/cef/interfaces/cef_browser.rs
+++ b/servo/ports/cef/interfaces/cef_browser.rs
@@ -181,17 +181,17 @@ pub struct _cef_browser_t {
   //
   pub send_process_message: Option<extern "C" fn(this: *mut cef_browser_t,
       target_process: interfaces::cef_process_id_t,
       message: *mut interfaces::cef_process_message_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_browser_t = _cef_browser_t;
@@ -618,17 +618,17 @@ pub struct _cef_run_file_dialog_callback
   //
   pub cont: Option<extern "C" fn(this: *mut cef_run_file_dialog_callback_t,
       browser_host: *mut interfaces::cef_browser_host_t,
       file_paths: types::cef_string_list_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_run_file_dialog_callback_t = _cef_run_file_dialog_callback_t;
@@ -1113,17 +1113,17 @@ pub struct _cef_browser_host_t {
   // this function.
   //
   pub initialize_compositing: Option<extern "C" fn(
       this: *mut cef_browser_host_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_browser_host_t = _cef_browser_host_t;
--- a/servo/ports/cef/interfaces/cef_browser_process_handler.rs
+++ b/servo/ports/cef/interfaces/cef_browser_process_handler.rs
@@ -91,17 +91,17 @@ pub struct _cef_browser_process_handler_
   // provided then printing will not be supported on the Linux platform.
   //
   pub get_print_handler: Option<extern "C" fn(
       this: *mut cef_browser_process_handler_t) -> *mut interfaces::cef_print_handler_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_browser_process_handler_t = _cef_browser_process_handler_t;
--- a/servo/ports/cef/interfaces/cef_callback.rs
+++ b/servo/ports/cef/interfaces/cef_callback.rs
@@ -63,17 +63,17 @@ pub struct _cef_callback_t {
   //
   // Cancel processing.
   //
   pub cancel: Option<extern "C" fn(this: *mut cef_callback_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_callback_t = _cef_callback_t;
@@ -213,17 +213,17 @@ pub struct _cef_completion_callback_t {
   // Method that will be called once the task is complete.
   //
   pub on_complete: Option<extern "C" fn(
       this: *mut cef_completion_callback_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_completion_callback_t = _cef_completion_callback_t;
--- a/servo/ports/cef/interfaces/cef_client.rs
+++ b/servo/ports/cef/interfaces/cef_client.rs
@@ -146,17 +146,17 @@ pub struct _cef_client_t {
   pub on_process_message_received: Option<extern "C" fn(this: *mut cef_client_t,
       browser: *mut interfaces::cef_browser_t,
       source_process: interfaces::cef_process_id_t,
       message: *mut interfaces::cef_process_message_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_client_t = _cef_client_t;
--- a/servo/ports/cef/interfaces/cef_command_line.rs
+++ b/servo/ports/cef/interfaces/cef_command_line.rs
@@ -195,17 +195,17 @@ pub struct _cef_command_line_t {
   // "valgrind" or "gdb --args".
   //
   pub prepend_wrapper: Option<extern "C" fn(this: *mut cef_command_line_t,
       wrapper: *const types::cef_string_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_command_line_t = _cef_command_line_t;
--- a/servo/ports/cef/interfaces/cef_context_menu_handler.rs
+++ b/servo/ports/cef/interfaces/cef_context_menu_handler.rs
@@ -94,17 +94,17 @@ pub struct _cef_context_menu_handler_t {
   pub on_context_menu_dismissed: Option<extern "C" fn(
       this: *mut cef_context_menu_handler_t,
       browser: *mut interfaces::cef_browser_t,
       frame: *mut interfaces::cef_frame_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_context_menu_handler_t = _cef_context_menu_handler_t;
@@ -421,17 +421,17 @@ pub struct _cef_context_menu_params_t {
   // any, that the context menu was invoked on.
   //
   pub get_edit_state_flags: Option<extern "C" fn(
       this: *mut cef_context_menu_params_t) -> types::cef_context_menu_edit_state_flags_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_context_menu_params_t = _cef_context_menu_params_t;
--- a/servo/ports/cef/interfaces/cef_cookie.rs
+++ b/servo/ports/cef/interfaces/cef_cookie.rs
@@ -127,17 +127,17 @@ pub struct _cef_cookie_manager_t {
   // be accessed.
   //
   pub flush_store: Option<extern "C" fn(this: *mut cef_cookie_manager_t,
       callback: *mut interfaces::cef_completion_callback_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_cookie_manager_t = _cef_cookie_manager_t;
@@ -428,17 +428,17 @@ pub struct _cef_cookie_visitor_t {
   //
   pub visit: Option<extern "C" fn(this: *mut cef_cookie_visitor_t,
       cookie: *const interfaces::cef_cookie_t, count: libc::c_int,
       total: libc::c_int, deleteCookie: *mut libc::c_int) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_cookie_visitor_t = _cef_cookie_visitor_t;
--- a/servo/ports/cef/interfaces/cef_dialog_handler.rs
+++ b/servo/ports/cef/interfaces/cef_dialog_handler.rs
@@ -67,17 +67,17 @@ pub struct _cef_file_dialog_callback_t {
   // Cancel the file selection.
   //
   pub cancel: Option<extern "C" fn(this: *mut cef_file_dialog_callback_t) -> (
       )>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_file_dialog_callback_t = _cef_file_dialog_callback_t;
@@ -233,17 +233,17 @@ pub struct _cef_dialog_handler_t {
       mode: types::cef_file_dialog_mode_t, title: *const types::cef_string_t,
       default_file_name: *const types::cef_string_t,
       accept_types: types::cef_string_list_t,
       callback: *mut interfaces::cef_file_dialog_callback_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_dialog_handler_t = _cef_dialog_handler_t;
--- a/servo/ports/cef/interfaces/cef_display_handler.rs
+++ b/servo/ports/cef/interfaces/cef_display_handler.rs
@@ -98,17 +98,17 @@ pub struct _cef_display_handler_t {
   pub on_console_message: Option<extern "C" fn(this: *mut cef_display_handler_t,
       browser: *mut interfaces::cef_browser_t,
       message: *const types::cef_string_t, source: *const types::cef_string_t,
       line: libc::c_int) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_display_handler_t = _cef_display_handler_t;
--- a/servo/ports/cef/interfaces/cef_dom.rs
+++ b/servo/ports/cef/interfaces/cef_dom.rs
@@ -64,17 +64,17 @@ pub struct _cef_domvisitor_t {
   // of this function.
   //
   pub visit: Option<extern "C" fn(this: *mut cef_domvisitor_t,
       document: *mut interfaces::cef_domdocument_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_domvisitor_t = _cef_domvisitor_t;
@@ -303,17 +303,17 @@ pub struct _cef_domdocument_t {
   //
   // The resulting string must be freed by calling cef_string_userfree_free().
   pub get_complete_url: Option<extern "C" fn(this: *mut cef_domdocument_t,
       partialURL: *const types::cef_string_t) -> types::cef_string_userfree_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_domdocument_t = _cef_domdocument_t;
@@ -815,17 +815,17 @@ pub struct _cef_domnode_t {
   //
   // The resulting string must be freed by calling cef_string_userfree_free().
   pub get_element_inner_text: Option<extern "C" fn(
       this: *mut cef_domnode_t) -> types::cef_string_userfree_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_domnode_t = _cef_domnode_t;
--- a/servo/ports/cef/interfaces/cef_download_handler.rs
+++ b/servo/ports/cef/interfaces/cef_download_handler.rs
@@ -63,17 +63,17 @@ pub struct _cef_before_download_callback
   //
   pub cont: Option<extern "C" fn(this: *mut cef_before_download_callback_t,
       download_path: *const types::cef_string_t, show_dialog: libc::c_int) -> (
       )>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_before_download_callback_t = _cef_before_download_callback_t;
@@ -204,17 +204,17 @@ pub struct _cef_download_item_callback_t
   // Call to cancel the download.
   //
   pub cancel: Option<extern "C" fn(this: *mut cef_download_item_callback_t) -> (
       )>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_download_item_callback_t = _cef_download_item_callback_t;
@@ -362,17 +362,17 @@ pub struct _cef_download_handler_t {
       this: *mut cef_download_handler_t,
       browser: *mut interfaces::cef_browser_t,
       download_item: *mut interfaces::cef_download_item_t,
       callback: *mut interfaces::cef_download_item_callback_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_download_handler_t = _cef_download_handler_t;
--- a/servo/ports/cef/interfaces/cef_download_item.rs
+++ b/servo/ports/cef/interfaces/cef_download_item.rs
@@ -155,17 +155,17 @@ pub struct _cef_download_item_t {
   //
   // The resulting string must be freed by calling cef_string_userfree_free().
   pub get_mime_type: Option<extern "C" fn(
       this: *mut cef_download_item_t) -> types::cef_string_userfree_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_download_item_t = _cef_download_item_t;
--- a/servo/ports/cef/interfaces/cef_drag_data.rs
+++ b/servo/ports/cef/interfaces/cef_drag_data.rs
@@ -199,17 +199,17 @@ pub struct _cef_drag_data_t {
   //
   pub add_file: Option<extern "C" fn(this: *mut cef_drag_data_t,
       path: *const types::cef_string_t,
       display_name: *const types::cef_string_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_drag_data_t = _cef_drag_data_t;
--- a/servo/ports/cef/interfaces/cef_drag_handler.rs
+++ b/servo/ports/cef/interfaces/cef_drag_handler.rs
@@ -65,17 +65,17 @@ pub struct _cef_drag_handler_t {
   pub on_drag_enter: Option<extern "C" fn(this: *mut cef_drag_handler_t,
       browser: *mut interfaces::cef_browser_t,
       dragData: *mut interfaces::cef_drag_data_t,
       mask: types::cef_drag_operations_mask_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_drag_handler_t = _cef_drag_handler_t;
--- a/servo/ports/cef/interfaces/cef_focus_handler.rs
+++ b/servo/ports/cef/interfaces/cef_focus_handler.rs
@@ -78,17 +78,17 @@ pub struct _cef_focus_handler_t {
   // Called when the browser component has received focus.
   //
   pub on_got_focus: Option<extern "C" fn(this: *mut cef_focus_handler_t,
       browser: *mut interfaces::cef_browser_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_focus_handler_t = _cef_focus_handler_t;
--- a/servo/ports/cef/interfaces/cef_frame.rs
+++ b/servo/ports/cef/interfaces/cef_frame.rs
@@ -209,17 +209,17 @@ pub struct _cef_frame_t {
   // process.
   //
   pub visit_dom: Option<extern "C" fn(this: *mut cef_frame_t,
       visitor: *mut interfaces::cef_domvisitor_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_frame_t = _cef_frame_t;
--- a/servo/ports/cef/interfaces/cef_geolocation.rs
+++ b/servo/ports/cef/interfaces/cef_geolocation.rs
@@ -62,17 +62,17 @@ pub struct _cef_get_geolocation_callback
   //
   pub on_location_update: Option<extern "C" fn(
       this: *mut cef_get_geolocation_callback_t,
       position: *const interfaces::cef_geoposition_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_get_geolocation_callback_t = _cef_get_geolocation_callback_t;
--- a/servo/ports/cef/interfaces/cef_geolocation_handler.rs
+++ b/servo/ports/cef/interfaces/cef_geolocation_handler.rs
@@ -60,17 +60,17 @@ pub struct _cef_geolocation_callback_t {
   // Call to allow or deny geolocation access.
   //
   pub cont: Option<extern "C" fn(this: *mut cef_geolocation_callback_t,
       allow: libc::c_int) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_geolocation_callback_t = _cef_geolocation_callback_t;
@@ -219,17 +219,17 @@ pub struct _cef_geolocation_handler_t {
       this: *mut cef_geolocation_handler_t,
       browser: *mut interfaces::cef_browser_t,
       requesting_url: *const types::cef_string_t, request_id: libc::c_int) -> (
       )>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_geolocation_handler_t = _cef_geolocation_handler_t;
--- a/servo/ports/cef/interfaces/cef_jsdialog_handler.rs
+++ b/servo/ports/cef/interfaces/cef_jsdialog_handler.rs
@@ -61,17 +61,17 @@ pub struct _cef_jsdialog_callback_t {
   // was pressed. The |user_input| value should be specified for prompt dialogs.
   //
   pub cont: Option<extern "C" fn(this: *mut cef_jsdialog_callback_t,
       success: libc::c_int, user_input: *const types::cef_string_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_jsdialog_callback_t = _cef_jsdialog_callback_t;
@@ -250,17 +250,17 @@ pub struct _cef_jsdialog_handler_t {
   // Called when the default implementation dialog is closed.
   //
   pub on_dialog_closed: Option<extern "C" fn(this: *mut cef_jsdialog_handler_t,
       browser: *mut interfaces::cef_browser_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_jsdialog_handler_t = _cef_jsdialog_handler_t;
--- a/servo/ports/cef/interfaces/cef_keyboard_handler.rs
+++ b/servo/ports/cef/interfaces/cef_keyboard_handler.rs
@@ -76,17 +76,17 @@ pub struct _cef_keyboard_handler_t {
   pub on_key_event: Option<extern "C" fn(this: *mut cef_keyboard_handler_t,
       browser: *mut interfaces::cef_browser_t,
       event: *const interfaces::cef_key_event_t,
       os_event: types::cef_event_handle_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_keyboard_handler_t = _cef_keyboard_handler_t;
--- a/servo/ports/cef/interfaces/cef_life_span_handler.rs
+++ b/servo/ports/cef/interfaces/cef_life_span_handler.rs
@@ -163,17 +163,17 @@ pub struct _cef_life_span_handler_t {
   // additional usage information.
   //
   pub on_before_close: Option<extern "C" fn(this: *mut cef_life_span_handler_t,
       browser: *mut interfaces::cef_browser_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_life_span_handler_t = _cef_life_span_handler_t;
--- a/servo/ports/cef/interfaces/cef_load_handler.rs
+++ b/servo/ports/cef/interfaces/cef_load_handler.rs
@@ -103,17 +103,17 @@ pub struct _cef_load_handler_t {
       browser: *mut interfaces::cef_browser_t,
       frame: *mut interfaces::cef_frame_t, errorCode: types::cef_errorcode_t,
       errorText: *const types::cef_string_t,
       failedUrl: *const types::cef_string_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_load_handler_t = _cef_load_handler_t;
--- a/servo/ports/cef/interfaces/cef_menu_model.rs
+++ b/servo/ports/cef/interfaces/cef_menu_model.rs
@@ -396,17 +396,17 @@ pub struct _cef_menu_model_t {
   pub get_accelerator_at: Option<extern "C" fn(this: *mut cef_menu_model_t,
       index: libc::c_int, key_code: *mut libc::c_int,
       shift_pressed: *mut libc::c_int, ctrl_pressed: *mut libc::c_int,
       alt_pressed: *mut libc::c_int) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_menu_model_t = _cef_menu_model_t;
--- a/servo/ports/cef/interfaces/cef_print_handler.rs
+++ b/servo/ports/cef/interfaces/cef_print_handler.rs
@@ -65,17 +65,17 @@ pub struct _cef_print_dialog_callback_t 
   // Cancel the printing.
   //
   pub cancel: Option<extern "C" fn(this: *mut cef_print_dialog_callback_t) -> (
       )>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_print_dialog_callback_t = _cef_print_dialog_callback_t;
@@ -215,17 +215,17 @@ pub struct _cef_print_job_callback_t {
   //
   // Indicate completion of the print job.
   //
   pub cont: Option<extern "C" fn(this: *mut cef_print_job_callback_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_print_job_callback_t = _cef_print_job_callback_t;
@@ -380,17 +380,17 @@ pub struct _cef_print_handler_t {
   // Reset client state related to printing.
   //
   pub on_print_reset: Option<extern "C" fn(this: *mut cef_print_handler_t) -> (
       )>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_print_handler_t = _cef_print_handler_t;
--- a/servo/ports/cef/interfaces/cef_print_settings.rs
+++ b/servo/ports/cef/interfaces/cef_print_settings.rs
@@ -201,17 +201,17 @@ pub struct _cef_print_settings_t {
   // Get the duplex mode.
   //
   pub get_duplex_mode: Option<extern "C" fn(
       this: *mut cef_print_settings_t) -> types::cef_duplex_mode_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_print_settings_t = _cef_print_settings_t;
--- a/servo/ports/cef/interfaces/cef_process_message.rs
+++ b/servo/ports/cef/interfaces/cef_process_message.rs
@@ -86,17 +86,17 @@ pub struct _cef_process_message_t {
   // Returns the list of arguments.
   //
   pub get_argument_list: Option<extern "C" fn(
       this: *mut cef_process_message_t) -> *mut interfaces::cef_list_value_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_process_message_t = _cef_process_message_t;
--- a/servo/ports/cef/interfaces/cef_render_handler.rs
+++ b/servo/ports/cef/interfaces/cef_render_handler.rs
@@ -179,17 +179,17 @@ pub struct _cef_render_handler_t {
   // flip). This is called only during accelerated compositing.
   //
   pub on_present: Option<extern "C" fn(this: *mut cef_render_handler_t,
       browser: *mut interfaces::cef_browser_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_render_handler_t = _cef_render_handler_t;
--- a/servo/ports/cef/interfaces/cef_render_process_handler.rs
+++ b/servo/ports/cef/interfaces/cef_render_process_handler.rs
@@ -168,17 +168,17 @@ pub struct _cef_render_process_handler_t
       this: *mut cef_render_process_handler_t,
       browser: *mut interfaces::cef_browser_t,
       source_process: interfaces::cef_process_id_t,
       message: *mut interfaces::cef_process_message_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_render_process_handler_t = _cef_render_process_handler_t;
--- a/servo/ports/cef/interfaces/cef_request.rs
+++ b/servo/ports/cef/interfaces/cef_request.rs
@@ -162,17 +162,17 @@ pub struct _cef_request_t {
   // frame navigation.
   //
   pub get_transition_type: Option<extern "C" fn(
       this: *mut cef_request_t) -> types::cef_transition_type_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_request_t = _cef_request_t;
@@ -576,17 +576,17 @@ pub struct _cef_post_data_t {
   //
   // Remove all existing post data elements.
   //
   pub remove_elements: Option<extern "C" fn(this: *mut cef_post_data_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_post_data_t = _cef_post_data_t;
@@ -848,17 +848,17 @@ pub struct _cef_post_data_element_t {
   // actually read.
   //
   pub get_bytes: Option<extern "C" fn(this: *mut cef_post_data_element_t,
       size: libc::size_t, bytes: *mut ()) -> libc::size_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_post_data_element_t = _cef_post_data_element_t;
--- a/servo/ports/cef/interfaces/cef_request_context.rs
+++ b/servo/ports/cef/interfaces/cef_request_context.rs
@@ -84,17 +84,17 @@ pub struct _cef_request_context_t {
   // Returns the handler for this context if any.
   //
   pub get_handler: Option<extern "C" fn(
       this: *mut cef_request_context_t) -> *mut interfaces::cef_request_context_handler_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_request_context_t = _cef_request_context_t;
--- a/servo/ports/cef/interfaces/cef_request_context_handler.rs
+++ b/servo/ports/cef/interfaces/cef_request_context_handler.rs
@@ -60,17 +60,17 @@ pub struct _cef_request_context_handler_
   // manager will be used if this function returns NULL.
   //
   pub get_cookie_manager: Option<extern "C" fn(
       this: *mut cef_request_context_handler_t) -> *mut interfaces::cef_cookie_manager_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_request_context_handler_t = _cef_request_context_handler_t;
--- a/servo/ports/cef/interfaces/cef_request_handler.rs
+++ b/servo/ports/cef/interfaces/cef_request_handler.rs
@@ -65,17 +65,17 @@ pub struct _cef_quota_callback_t {
   //
   // Cancel the quota request.
   //
   pub cancel: Option<extern "C" fn(this: *mut cef_quota_callback_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_quota_callback_t = _cef_quota_callback_t;
@@ -220,17 +220,17 @@ pub struct _cef_allow_certificate_error_
   //
   pub cont: Option<extern "C" fn(
       this: *mut cef_allow_certificate_error_callback_t,
       allow: libc::c_int) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_allow_certificate_error_callback_t = _cef_allow_certificate_error_callback_t;
@@ -480,17 +480,17 @@ pub struct _cef_request_handler_t {
   //
   pub on_render_process_terminated: Option<extern "C" fn(
       this: *mut cef_request_handler_t, browser: *mut interfaces::cef_browser_t,
       status: types::cef_termination_status_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_request_handler_t = _cef_request_handler_t;
--- a/servo/ports/cef/interfaces/cef_resource_bundle_handler.rs
+++ b/servo/ports/cef/interfaces/cef_resource_bundle_handler.rs
@@ -77,17 +77,17 @@ pub struct _cef_resource_bundle_handler_
   pub get_data_resource: Option<extern "C" fn(
       this: *mut cef_resource_bundle_handler_t, resource_id: libc::c_int,
       data: *mut *mut libc::c_void,
       data_size: *mut libc::size_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_resource_bundle_handler_t = _cef_resource_bundle_handler_t;
--- a/servo/ports/cef/interfaces/cef_resource_handler.rs
+++ b/servo/ports/cef/interfaces/cef_resource_handler.rs
@@ -112,17 +112,17 @@ pub struct _cef_resource_handler_t {
   //
   // Request processing has been canceled.
   //
   pub cancel: Option<extern "C" fn(this: *mut cef_resource_handler_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_resource_handler_t = _cef_resource_handler_t;
--- a/servo/ports/cef/interfaces/cef_response.rs
+++ b/servo/ports/cef/interfaces/cef_response.rs
@@ -117,17 +117,17 @@ pub struct _cef_response_t {
   // Set all response header fields.
   //
   pub set_header_map: Option<extern "C" fn(this: *mut cef_response_t,
       headerMap: types::cef_string_multimap_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_response_t = _cef_response_t;
--- a/servo/ports/cef/interfaces/cef_scheme.rs
+++ b/servo/ports/cef/interfaces/cef_scheme.rs
@@ -103,17 +103,17 @@ pub struct _cef_scheme_registrar_t {
   //
   pub add_custom_scheme: Option<extern "C" fn(this: *mut cef_scheme_registrar_t,
       scheme_name: *const types::cef_string_t, is_standard: libc::c_int,
       is_local: libc::c_int, is_display_isolated: libc::c_int) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_scheme_registrar_t = _cef_scheme_registrar_t;
@@ -298,17 +298,17 @@ pub struct _cef_scheme_handler_factory_t
       browser: *mut interfaces::cef_browser_t,
       frame: *mut interfaces::cef_frame_t,
       scheme_name: *const types::cef_string_t,
       request: *mut interfaces::cef_request_t) -> *mut interfaces::cef_resource_handler_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_scheme_handler_factory_t = _cef_scheme_handler_factory_t;
--- a/servo/ports/cef/interfaces/cef_stream.rs
+++ b/servo/ports/cef/interfaces/cef_stream.rs
@@ -85,17 +85,17 @@ pub struct _cef_read_handler_t {
   // the handler from.
   //
   pub may_block: Option<extern "C" fn(
       this: *mut cef_read_handler_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_read_handler_t = _cef_read_handler_t;
@@ -313,17 +313,17 @@ pub struct _cef_stream_reader_t {
   // the reader from.
   //
   pub may_block: Option<extern "C" fn(
       this: *mut cef_stream_reader_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_stream_reader_t = _cef_stream_reader_t;
@@ -578,17 +578,17 @@ pub struct _cef_write_handler_t {
   // the handler from.
   //
   pub may_block: Option<extern "C" fn(
       this: *mut cef_write_handler_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_write_handler_t = _cef_write_handler_t;
@@ -807,17 +807,17 @@ pub struct _cef_stream_writer_t {
   // the writer from.
   //
   pub may_block: Option<extern "C" fn(
       this: *mut cef_stream_writer_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_stream_writer_t = _cef_stream_writer_t;
--- a/servo/ports/cef/interfaces/cef_string_visitor.rs
+++ b/servo/ports/cef/interfaces/cef_string_visitor.rs
@@ -59,17 +59,17 @@ pub struct _cef_string_visitor_t {
   // Method that will be executed.
   //
   pub visit: Option<extern "C" fn(this: *mut cef_string_visitor_t,
       string: *const types::cef_string_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_string_visitor_t = _cef_string_visitor_t;
--- a/servo/ports/cef/interfaces/cef_task.rs
+++ b/servo/ports/cef/interfaces/cef_task.rs
@@ -63,17 +63,17 @@ pub struct _cef_task_t {
   //
   // Method that will be executed on the target thread.
   //
   pub execute: Option<extern "C" fn(this: *mut cef_task_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_task_t = _cef_task_t;
@@ -239,17 +239,17 @@ pub struct _cef_task_runner_t {
   // specified delay.
   //
   pub post_delayed_task: Option<extern "C" fn(this: *mut cef_task_runner_t,
       task: *mut interfaces::cef_task_t, delay_ms: i64) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_task_runner_t = _cef_task_runner_t;
--- a/servo/ports/cef/interfaces/cef_trace.rs
+++ b/servo/ports/cef/interfaces/cef_trace.rs
@@ -64,17 +64,17 @@ pub struct _cef_end_tracing_callback_t {
   //
   pub on_end_tracing_complete: Option<extern "C" fn(
       this: *mut cef_end_tracing_callback_t,
       tracing_file: *const types::cef_string_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_end_tracing_callback_t = _cef_end_tracing_callback_t;
--- a/servo/ports/cef/interfaces/cef_urlrequest.rs
+++ b/servo/ports/cef/interfaces/cef_urlrequest.rs
@@ -96,17 +96,17 @@ pub struct _cef_urlrequest_t {
   //
   // Cancel the request.
   //
   pub cancel: Option<extern "C" fn(this: *mut cef_urlrequest_t) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_urlrequest_t = _cef_urlrequest_t;
@@ -382,17 +382,17 @@ pub struct _cef_urlrequest_client_t {
       this: *mut cef_urlrequest_client_t, isProxy: libc::c_int,
       host: *const types::cef_string_t, port: libc::c_int,
       realm: *const types::cef_string_t, scheme: *const types::cef_string_t,
       callback: *mut interfaces::cef_auth_callback_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_urlrequest_client_t = _cef_urlrequest_client_t;
--- a/servo/ports/cef/interfaces/cef_v8.rs
+++ b/servo/ports/cef/interfaces/cef_v8.rs
@@ -126,17 +126,17 @@ pub struct _cef_v8context_t {
   //
   pub eval: Option<extern "C" fn(this: *mut cef_v8context_t,
       code: *const types::cef_string_t, retval: *mut interfaces::cef_v8value_t,
       exception: *mut interfaces::cef_v8exception_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_v8context_t = _cef_v8context_t;
@@ -442,17 +442,17 @@ pub struct _cef_v8handler_t {
       arguments_count: libc::size_t,
       arguments: *const *mut interfaces::cef_v8value_t,
       retval: *mut interfaces::cef_v8value_t,
       exception: *mut types::cef_string_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_v8handler_t = _cef_v8handler_t;
@@ -614,17 +614,17 @@ pub struct _cef_v8accessor_t {
   pub set: Option<extern "C" fn(this: *mut cef_v8accessor_t,
       name: *const types::cef_string_t, object: *mut interfaces::cef_v8value_t,
       value: *mut interfaces::cef_v8value_t,
       exception: *mut types::cef_string_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_v8accessor_t = _cef_v8accessor_t;
@@ -839,17 +839,17 @@ pub struct _cef_v8exception_t {
   // occurred.
   //
   pub get_end_column: Option<extern "C" fn(
       this: *mut cef_v8exception_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_v8exception_t = _cef_v8exception_t;
@@ -1411,17 +1411,17 @@ pub struct _cef_v8value_t {
   pub execute_function_with_context: Option<extern "C" fn(
       this: *mut cef_v8value_t, context: *mut interfaces::cef_v8context_t,
       object: *mut interfaces::cef_v8value_t, arguments_count: libc::size_t,
       arguments: *const *mut interfaces::cef_v8value_t) -> *mut interfaces::cef_v8value_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_v8value_t = _cef_v8value_t;
@@ -2418,17 +2418,17 @@ pub struct _cef_v8stack_trace_t {
   // Returns the stack frame at the specified 0-based index.
   //
   pub get_frame: Option<extern "C" fn(this: *mut cef_v8stack_trace_t,
       index: libc::c_int) -> *mut interfaces::cef_v8stack_frame_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_v8stack_trace_t = _cef_v8stack_trace_t;
@@ -2655,17 +2655,17 @@ pub struct _cef_v8stack_frame_t {
   // Returns true (1) if the function was called as a constructor via "new".
   //
   pub is_constructor: Option<extern "C" fn(
       this: *mut cef_v8stack_frame_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_v8stack_frame_t = _cef_v8stack_frame_t;
--- a/servo/ports/cef/interfaces/cef_values.rs
+++ b/servo/ports/cef/interfaces/cef_values.rs
@@ -86,17 +86,17 @@ pub struct _cef_binary_value_t {
   //
   pub get_data: Option<extern "C" fn(this: *mut cef_binary_value_t,
       buffer: *mut (), buffer_size: libc::size_t,
       data_offset: libc::size_t) -> libc::size_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_binary_value_t = _cef_binary_value_t;
@@ -471,17 +471,17 @@ pub struct _cef_dictionary_value_t {
   //
   pub set_list: Option<extern "C" fn(this: *mut cef_dictionary_value_t,
       key: *const types::cef_string_t,
       value: *mut interfaces::cef_list_value_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_dictionary_value_t = _cef_dictionary_value_t;
@@ -1174,17 +1174,17 @@ pub struct _cef_list_value_t {
   //
   pub set_list: Option<extern "C" fn(this: *mut cef_list_value_t,
       index: libc::c_int,
       value: *mut interfaces::cef_list_value_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_list_value_t = _cef_list_value_t;
--- a/servo/ports/cef/interfaces/cef_web_plugin.rs
+++ b/servo/ports/cef/interfaces/cef_web_plugin.rs
@@ -81,17 +81,17 @@ pub struct _cef_web_plugin_info_t {
   //
   // The resulting string must be freed by calling cef_string_userfree_free().
   pub get_description: Option<extern "C" fn(
       this: *mut cef_web_plugin_info_t) -> types::cef_string_userfree_t>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_web_plugin_info_t = _cef_web_plugin_info_t;
@@ -268,17 +268,17 @@ pub struct _cef_web_plugin_info_visitor_
   //
   pub visit: Option<extern "C" fn(this: *mut cef_web_plugin_info_visitor_t,
       info: *mut interfaces::cef_web_plugin_info_t, count: libc::c_int,
       total: libc::c_int) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_web_plugin_info_visitor_t = _cef_web_plugin_info_visitor_t;
@@ -416,17 +416,17 @@ pub struct _cef_web_plugin_unstable_call
   //
   pub is_unstable: Option<extern "C" fn(
       this: *mut cef_web_plugin_unstable_callback_t,
       path: *const types::cef_string_t, unstable: libc::c_int) -> ()>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_web_plugin_unstable_callback_t = _cef_web_plugin_unstable_callback_t;
--- a/servo/ports/cef/interfaces/cef_xml_reader.rs
+++ b/servo/ports/cef/interfaces/cef_xml_reader.rs
@@ -272,17 +272,17 @@ pub struct _cef_xml_reader_t {
   // cursor position was set successfully.
   //
   pub move_to_carrying_element: Option<extern "C" fn(
       this: *mut cef_xml_reader_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_xml_reader_t = _cef_xml_reader_t;
--- a/servo/ports/cef/interfaces/cef_zip_reader.rs
+++ b/servo/ports/cef/interfaces/cef_zip_reader.rs
@@ -135,17 +135,17 @@ pub struct _cef_zip_reader_t {
   //
   // Returns true (1) if at end of the file contents.
   //
   pub eof: Option<extern "C" fn(this: *mut cef_zip_reader_t) -> libc::c_int>,
 
   //
   // The reference count. This will only be present for Rust instances!
   //
-  pub ref_count: uint,
+  pub ref_count: usize,
 
   //
   // Extra data. This will only be present for Rust instances!
   //
   pub extra: u8,
 } 
 
 pub type cef_zip_reader_t = _cef_zip_reader_t;
--- a/servo/ports/cef/lib.rs
+++ b/servo/ports/cef/lib.rs
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#![feature(int_uint)]
+#![feature(alloc)]
 #![feature(box_syntax)]
 #![feature(plugin)]
 #![feature(link_args)]
 #![feature(thread_local)]
 #![feature(unicode)]
 #![feature(core)]
 #![feature(std_misc)]
 #![feature(rustc_private)]
--- a/servo/ports/cef/macros.rs
+++ b/servo/ports/cef/macros.rs
@@ -12,23 +12,23 @@
 //
 //    cef_class_impl! {
 //        ServoCefThing : CefThing, cef_thing_t {
 //            // Declare method implementations using the *C* API. (This may change later, once we
 //            // have associated types in Rust.)
 //            //
 //            // Note that if the method returns unit, you must write `-> ()` explicitly. This is
 //            // due to limitations of Rust's macro system.
-//            fn foo(&this, a: int, b: *mut cef_other_thing_t) -> () {
-//                // Inside here, `a` will have type `int`, and `b` will have the type
+//            fn foo(&this, a: isize, b: *mut cef_other_thing_t) -> () {
+//                // Inside here, `a` will have type `isize`, and `b` will have the type
 //                // `CefOtherThing` -- i.e. the Rust-wrapped version of `cef_other_thing_t`.
 //                ...
 //            }
 //
-//            fn bar(&this, a: int) -> *mut cef_other_thing_t {
+//            fn bar(&this, a: isize) -> *mut cef_other_thing_t {
 //                // Return types are automatically unwrapped from the Rust types (e.g.
 //                // `CefOtherThing`) into the corresponding C types (e.g. `*mut
 //                // cef_other_thing_t`).
 //                let x: CefOtherThing = ...;
 //                x
 //            }
 //        }
 //    }
@@ -61,17 +61,17 @@ macro_rules! full_cef_class_impl(
         )*
     }) => (
         impl $class_name {
             pub fn as_cef_interface(self) -> $interface_name {
                 let cef_object = unsafe {
                     // Calculate the offset of the reference count. This is the size of the
                     // structure.
                     let null: *const $c_interface_name = ::std::ptr::null();
-                    let offset: *const uint = &(*null).ref_count;
+                    let offset: *const usize = &(*null).ref_count;
                     let size = (offset as ::libc::size_t) - (null as ::libc::size_t);
                     $interface_name::from_c_object_addref(
                         ::eutil::create_cef_object::<$c_interface_name,$class_name>(size))
                 };
                 unsafe {
                     $((*cef_object.c_object()).$method_name = Some($method_name as extern "C" fn(*mut $c_interface_name, $($c_method_arg_type,)*) -> $method_return_type);)*
                     let extra_slot =
                         ::std::mem::transmute::<&mut u8,
--- a/servo/ports/cef/string.rs
+++ b/servo/ports/cef/string.rs
@@ -89,17 +89,17 @@ pub extern "C" fn cef_string_utf8_set(sr
     unsafe {
        if copy != 0 {
            if !src.is_null() && src_len > 0 {
              (*output).str = libc::calloc(1, src_len + 1) as *mut u8;
              if (*output).str.is_null() {
                  return 0;
              }
 
-             ptr::copy((*output).str, src, src_len as uint);
+             ptr::copy((*output).str, src, src_len as usize);
              (*output).length = src_len;
              (*output).dtor = Some(string_utf8_dtor as extern "C" fn(*mut u8));
            }
        } else {
          (*output).str = mem::transmute(src);
          (*output).length = src_len;
          (*output).dtor = mem::transmute(0 as *const u8);
        }
@@ -107,39 +107,39 @@ pub extern "C" fn cef_string_utf8_set(sr
     return 1;
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_utf8_cmp(a: *const cef_string_utf8_t, b: *const cef_string_utf8_t) -> c_int {
     unsafe {
         let astr = (*a).str as *const u8;
         let bstr = (*b).str as *const u8;
-        let astr = slice::from_raw_parts(astr, (*a).length as uint);
-        let bstr = slice::from_raw_parts(bstr, (*b).length as uint);
+        let astr = slice::from_raw_parts(astr, (*a).length as usize);
+        let bstr = slice::from_raw_parts(bstr, (*b).length as usize);
         match astr.cmp(bstr) {
             Ordering::Less => -1,
             Ordering::Equal => 0,
             Ordering::Greater => 1
         }
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_utf8_to_utf16(src: *const u8, src_len: size_t, output: *mut cef_string_utf16_t) -> c_int {
-    slice_to_str(src, src_len as uint, |result| {
+    slice_to_str(src, src_len as usize, |result| {
         let conv = result.utf16_units().collect::<Vec<u16>>();
         cef_string_utf16_set(conv.as_ptr(), conv.len() as size_t, output, 1);
         1
     })
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_utf16_to_utf8(src: *const u16, src_len: size_t, output: *mut cef_string_utf8_t) -> c_int {
     unsafe {
-        let ustr = slice::from_raw_parts(src, src_len as uint);
+        let ustr = slice::from_raw_parts(src, src_len as usize);
         match string::String::from_utf16(ustr) {
             Ok(str) => {
                 cef_string_utf8_set(str.as_bytes().as_ptr(), str.len() as size_t, output, 1);
                 1 as c_int
             },
             _ =>  0 as c_int
         }
     }
@@ -170,17 +170,17 @@ pub extern "C" fn cef_string_utf16_set(s
        if copy != 0 {
            if !src.is_null() && src_len > 0 {
              (*output).str = libc::calloc(1, (src_len + 1) * mem::size_of::<c_ushort>() as u64) as
                  *mut u16;
              if (*output).str.is_null() {
                  return 0;
              }
 
-             ptr::copy((*output).str, src, src_len as uint);
+             ptr::copy((*output).str, src, src_len as usize);
              (*output).length = src_len;
              (*output).dtor = Some(string_utf16_dtor as extern "C" fn(*mut c_ushort));
            }
        } else {
          (*output).str = mem::transmute(src);
          (*output).length = src_len;
          (*output).dtor = mem::transmute(0 as *const u8);
        }
@@ -188,18 +188,18 @@ pub extern "C" fn cef_string_utf16_set(s
     return 1;
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_utf16_cmp(a: *const cef_string_utf16_t, b: *const cef_string_utf16_t) -> c_int {
     unsafe {
         let astr = (*a).str as *const _;
         let bstr = (*b).str as *const _;
-        let astr: &[u16] = slice::from_raw_parts(astr, (*a).length as uint);
-        let bstr: &[u16] = slice::from_raw_parts(bstr, (*b).length as uint);
+        let astr: &[u16] = slice::from_raw_parts(astr, (*a).length as usize);
+        let bstr: &[u16] = slice::from_raw_parts(bstr, (*b).length as usize);
         match astr.cmp(bstr) {
             Ordering::Less => -1,
             Ordering::Equal => 0,
             Ordering::Greater => 1
         }
     }
 }
 
@@ -228,17 +228,17 @@ pub extern "C" fn cef_string_wide_set(sr
        if copy != 0 {
            if !src.is_null() && src_len > 0 {
              (*output).str = libc::calloc(1, (src_len + 1) * mem::size_of::<wchar_t>() as u64) as
                  *mut wchar_t;
              if (*output).str.is_null() {
                  return 0;
              }
 
-             ptr::copy((*output).str, src, src_len as uint);
+             ptr::copy((*output).str, src, src_len as usize);
              (*output).length = src_len;
              (*output).dtor = Some(string_wide_dtor as extern "C" fn(*mut wchar_t));
            }
        } else {
          (*output).str = mem::transmute(src);
          (*output).length = src_len;
          (*output).dtor = mem::transmute(0 as *const u8);
        }
@@ -246,61 +246,61 @@ pub extern "C" fn cef_string_wide_set(sr
     return 1;
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_wide_cmp(a: *const cef_string_wide_t, b: *const cef_string_wide_t) -> c_int {
     unsafe {
         let astr = (*a).str as *const wchar_t;
         let bstr = (*b).str as *const wchar_t;
-        let astr = slice::from_raw_parts(astr, (*a).length as uint);
-        let bstr = slice::from_raw_parts(bstr, (*b).length as uint);
+        let astr = slice::from_raw_parts(astr, (*a).length as usize);
+        let bstr = slice::from_raw_parts(bstr, (*b).length as usize);
         match astr.cmp(bstr) {
             Ordering::Less => -1,
             Ordering::Equal => 0,
             Ordering::Greater => 1
         }
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_utf8_to_wide(src: *const u8, src_len: size_t, output: *mut cef_string_wide_t) -> c_int {
     if mem::size_of::<wchar_t>() == mem::size_of::<u16>() {
          return cef_string_utf8_to_utf16(src, src_len, output as *mut cef_string_utf16_t);
     }
-    slice_to_str(src, src_len as uint, |result| {
+    slice_to_str(src, src_len as usize, |result| {
         let conv = result.chars().map(|c| c as u32).collect::<Vec<u32>>();
         cef_string_wide_set(conv.as_ptr() as *const wchar_t, conv.len() as size_t, output, 1)
     })
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_wide_to_utf8(src: *const wchar_t, src_len: size_t, output: *mut cef_string_utf8_t) -> c_int {
     if mem::size_of::<wchar_t>() == mem::size_of::<u16>() {
          return cef_string_utf16_to_utf8(src as *const u16, src_len, output);
     }
     unsafe {
-        let ustr = slice::from_raw_parts(src, src_len as uint);
+        let ustr = slice::from_raw_parts(src, src_len as usize);
         let conv = ustr.iter().map(|&c| char::from_u32(c as u32).unwrap_or('\u{FFFD}')).collect::<String>();
         cef_string_utf8_set(conv.as_bytes().as_ptr(), conv.len() as size_t, output, 1)
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_ascii_to_utf16(src: *const u8, src_len: size_t, output: *mut cef_string_utf16_t) -> c_int {
-    slice_to_str(src, src_len as uint, |result| {
+    slice_to_str(src, src_len as usize, |result| {
         let conv = result.utf16_units().collect::<Vec<u16>>();
         cef_string_utf16_set(conv.as_ptr(), conv.len() as size_t, output, 1)
     })
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_ascii_to_wide(src: *const u8, src_len: size_t, output: *mut cef_string_wide_t) -> c_int {
     unsafe {
-        let ustr = slice::from_raw_parts(src, src_len as uint);
+        let ustr = slice::from_raw_parts(src, src_len as usize);
         let conv = ustr.iter().map(|&c| c as u8).collect::<Vec<u8>>();
         cef_string_wide_set(conv.as_ptr() as *const wchar_t, conv.len() as size_t, output, 1)
     }
 }
 
 pub fn empty_utf16_string() -> cef_string_utf16_t {
     cef_string_utf16_t {
         str: ptr::null_mut(),
--- a/servo/ports/cef/string_list.rs
+++ b/servo/ports/cef/string_list.rs
@@ -42,18 +42,18 @@ pub extern "C" fn cef_string_list_append
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_list_value(lt: *mut cef_string_list_t, index: c_int, value: *mut cef_string_t) -> c_int {
     unsafe {
         if index < 0 || lt.is_null() { return 0; }
         let v = string_list_to_vec(lt);
-        if index as uint > (*v).len() - 1 { return 0; }
-        let cs = (*v)[index as uint];
+        if index as usize > (*v).len() - 1 { return 0; }
+        let cs = (*v)[index as usize];
         cef_string_utf16_set(mem::transmute((*cs).str), (*cs).length, value, 1)
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_list_clear(lt: *mut cef_string_list_t) {
     unsafe {
         if lt.is_null() { return; }
--- a/servo/ports/cef/string_map.rs
+++ b/servo/ports/cef/string_map.rs
@@ -34,72 +34,72 @@ pub extern "C" fn cef_string_map_size(sm
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_map_append(sm: *mut cef_string_map_t, key: *const cef_string_t, value: *const cef_string_t) -> c_int {
     unsafe {
         if sm.is_null() { return 0; }
         let v = string_map_to_treemap(sm);
-        slice_to_str((*key).str as *const u8, (*key).length as uint, |result| {
+        slice_to_str((*key).str as *const u8, (*key).length as usize, |result| {
             let s = String::from_str(result);
             let csv = cef_string_userfree_utf16_alloc();
             cef_string_utf16_set((*value).str as *const u16, (*value).length, csv, 1);
             (*v).insert(s, csv);
             1
         })
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_map_find(sm: *mut cef_string_map_t, key: *const cef_string_t, value: *mut cef_string_t) -> c_int {
     unsafe {
         if sm.is_null() { return 0; }
         let v = string_map_to_treemap(sm);
-        slice_to_str((*key).str as *const u8, (*key).length as uint, |result| {
+        slice_to_str((*key).str as *const u8, (*key).length as usize, |result| {
             match (*v).get(&String::from_str(result)) {
                 Some(s) => {
                     cef_string_utf16_set((**s).str as *const u16, (**s).length, value, 1);
                     1
                 }
                 None => 0
             }
         })
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_map_key(sm: *mut cef_string_map_t, index: c_int, value: *mut cef_string_t) -> c_int {
     unsafe {
         if index < 0 || sm.is_null() { return 0; }
         let v = string_map_to_treemap(sm);
-        if index as uint > (*v).len() - 1 { return 0; }
+        if index as usize > (*v).len() - 1 { return 0; }
 
         for (i, k) in (*v).keys().enumerate() {
-            if i == index as uint {
+            if i == index as usize {
                 cef_string_utf16_set(k.as_bytes().as_ptr() as *const u16,
                                      k.len() as u64,
                                      value,
                                      1);
                 return 1;
             }
         }
     }
     0
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_map_value(sm: *mut cef_string_map_t, index: c_int, value: *mut cef_string_t) -> c_int {
     unsafe {
         if index < 0 || sm.is_null() { return 0; }
         let v = string_map_to_treemap(sm);
-        if index as uint > (*v).len() - 1 { return 0; }
+        if index as usize > (*v).len() - 1 { return 0; }
 
         for (i, val) in (*v).values().enumerate() {
-            if i == index as uint {
+            if i == index as usize {
                 cef_string_utf16_set((**val).str as *const u16, (**val).length, value, 1);
                 return 1;
             }
         }
     }
     0
 }
 
--- a/servo/ports/cef/string_multimap.rs
+++ b/servo/ports/cef/string_multimap.rs
@@ -35,31 +35,31 @@ pub extern "C" fn cef_string_multimap_si
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_multimap_find_count(smm: *mut cef_string_multimap_t, key: *const cef_string_t) -> c_int {
     unsafe {
         if smm.is_null() { return 0; }
         let v = string_multimap_to_treemap(smm);
-        slice_to_str((*key).str as *const u8, (*key).length as uint, |result| {
+        slice_to_str((*key).str as *const u8, (*key).length as usize, |result| {
             match (*v).get(&String::from_str(result)) {
                 Some(s) =>  s.len() as c_int,
                 None => 0
             }
         })
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_multimap_append(smm: *mut cef_string_multimap_t, key: *const cef_string_t, value: *const cef_string_t) -> c_int {
     unsafe {
         if smm.is_null() { return 0; }
         let v = string_multimap_to_treemap(smm);
-        slice_to_str((*key).str as *const u8, (*key).length as uint, |result| {
+        slice_to_str((*key).str as *const u8, (*key).length as usize, |result| {
             let s = String::from_str(result);
             let csv = cef_string_userfree_utf16_alloc();
             cef_string_utf16_set((*value).str as *const u16, (*value).length, csv, 1);
             match (*v).get_mut(&s) {
                 Some(vc) => (*vc).push(csv),
                 None => { (*v).insert(s, vec!(csv)); }
             }
             1
@@ -67,37 +67,37 @@ pub extern "C" fn cef_string_multimap_ap
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_multimap_enumerate(smm: *mut cef_string_multimap_t, key: *const cef_string_t, index: c_int, value: *mut cef_string_t) -> c_int {
     unsafe {
         if smm.is_null() { return 0; }
         let v = string_multimap_to_treemap(smm);
-        slice_to_str((*key).str as *const u8, (*key).length as uint, |result| {
+        slice_to_str((*key).str as *const u8, (*key).length as usize, |result| {
             match (*v).get(&String::from_str(result)) {
                 Some(s) => {
-                    if (*s).len() <= index as uint {
+                    if (*s).len() <= index as usize {
                         return 0;
                     }
-                    let cs = (*s)[index as uint];
+                    let cs = (*s)[index as usize];
                     cef_string_utf16_set((*cs).str as *const u16, (*cs).length, value, 1)
                 }
                 None => 0
             }
         })
     }
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_multimap_key(smm: *mut cef_string_multimap_t, index: c_int, value: *mut cef_string_t) -> c_int {
     unsafe {
         if index < 0 || smm.is_null() { return 0; }
         let v = string_multimap_to_treemap(smm);
-        let mut rem = index as uint;
+        let mut rem = index as usize;
 
         for (key, val) in (*v).iter() {
             if rem < (*val).len() {
                 return cef_string_utf16_set((*key).as_bytes().as_ptr() as *const u16,
                                             (*key).len() as u64,
                                             value,
                                             1);
             } else {
@@ -108,21 +108,21 @@ pub extern "C" fn cef_string_multimap_ke
     0
 }
 
 #[no_mangle]
 pub extern "C" fn cef_string_multimap_value(smm: *mut cef_string_multimap_t, index: c_int, value: *mut cef_string_t) -> c_int {
     unsafe {
         if index < 0 || smm.is_null() { return 0; }
         let v = string_multimap_to_treemap(smm);
-        let mut rem = index as uint;
+        let mut rem = index as usize;
 
         for val in (*v).values() {
             if rem < (*val).len() {
-                let cs = (*val)[rem as uint];
+                let cs = (*val)[rem as usize];
                 return cef_string_utf16_set((*cs).str as *const u16, (*cs).length, value, 1);
             } else {
                 rem -= (*val).len();
             }
         }
     }
     0
 }
--- a/servo/ports/cef/wrappers.rs
+++ b/servo/ports/cef/wrappers.rs
@@ -180,17 +180,17 @@ cef_unimplemented_wrapper!(cef_string_ma
 cef_unimplemented_wrapper!(cef_string_multimap_t, HashMap<String,Vec<String>>);
 cef_unimplemented_wrapper!(cef_string_t, String);
 
 impl<'a> CefWrap<*const cef_string_t> for &'a [u16] {
     fn to_c(buffer: &'a [u16]) -> *const cef_string_t {
         unsafe {
             let ptr: *mut c_ushort = mem::transmute(libc::malloc(((buffer.len() + 1) * 2) as u64));
             ptr::copy(ptr, mem::transmute(buffer.as_ptr()), buffer.len());
-            *ptr.offset(buffer.len() as int) = 0;
+            *ptr.offset(buffer.len() as isize) = 0;
 
             // FIXME(pcwalton): This leaks!! We should instead have the caller pass some scratch
             // stack space to create the object in. What a botch.
             boxed::into_raw(box cef_string_utf16 {
                 str: ptr,
                 length: buffer.len() as u64,
                 dtor: Some(free_boxed_utf16_string as extern "C" fn(*mut c_ushort)),
             }) as *const _
@@ -243,19 +243,19 @@ impl<'a> CefWrap<cef_string_userfree_t> 
     fn to_c(string: String) -> cef_string_userfree_t {
         let utf16_chars: Vec<u16> = Utf16Encoder::new(string.chars()).collect();
 
         let boxed_string;
         unsafe {
             let buffer = libc::malloc((mem::size_of::<c_ushort>() as libc::size_t) *
                                       ((utf16_chars.len() + 1) as libc::size_t)) as *mut u16;
             for (i, ch) in utf16_chars.iter().enumerate() {
-                *buffer.offset(i as int) = *ch
+                *buffer.offset(i as isize) = *ch
             }
-            *buffer.offset(utf16_chars.len() as int) = 0;
+            *buffer.offset(utf16_chars.len() as isize) = 0;
 
             boxed_string = libc::malloc(mem::size_of::<cef_string_utf16>() as libc::size_t) as
                 *mut cef_string_utf16;
             ptr::write(&mut (*boxed_string).str, buffer);
             ptr::write(&mut (*boxed_string).length, utf16_chars.len() as u64);
             ptr::write(&mut (*boxed_string).dtor, Some(free_utf16_buffer as extern "C" fn(*mut c_ushort)));
         }
         boxed_string