mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
update all cef interfaces to use borrows for string_list params
it was somewhat impossible to make this work with allocated string_lists due to constant leakage from box allocations going out of scope, so this should simplify it ane be more manageable in the future
This commit is contained in:
parent
e8e300a6fd
commit
612cefa02d
13 changed files with 48 additions and 39 deletions
|
@ -109,7 +109,7 @@ pub struct _cef_command_line_t {
|
|||
// array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }
|
||||
//
|
||||
pub get_argv: Option<extern "C" fn(this: *mut cef_command_line_t,
|
||||
argv: types::cef_string_list_t) -> ()>,
|
||||
argv: &types::cef_string_list_t) -> ()>,
|
||||
|
||||
//
|
||||
// Constructs and returns the represented command line string. Use this
|
||||
|
@ -183,7 +183,7 @@ pub struct _cef_command_line_t {
|
|||
// Get the remaining command line arguments.
|
||||
//
|
||||
pub get_arguments: Option<extern "C" fn(this: *mut cef_command_line_t,
|
||||
arguments: types::cef_string_list_t) -> ()>,
|
||||
arguments: &types::cef_string_list_t) -> ()>,
|
||||
|
||||
//
|
||||
// Add an argument to the end of the command line.
|
||||
|
@ -392,7 +392,7 @@ impl CefCommandLine {
|
|||
// Retrieve the original command line string as a vector of strings. The argv
|
||||
// array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }
|
||||
//
|
||||
pub fn get_argv(&self, argv: Vec<String>) -> () {
|
||||
pub fn get_argv(&self, argv: &Vec<String>) -> () {
|
||||
if self.c_object.is_null() ||
|
||||
self.c_object as usize == mem::POST_DROP_USIZE {
|
||||
panic!("called a CEF method on a null object")
|
||||
|
@ -572,7 +572,7 @@ impl CefCommandLine {
|
|||
//
|
||||
// Get the remaining command line arguments.
|
||||
//
|
||||
pub fn get_arguments(&self, arguments: Vec<String>) -> () {
|
||||
pub fn get_arguments(&self, arguments: &Vec<String>) -> () {
|
||||
if self.c_object.is_null() ||
|
||||
self.c_object as usize == mem::POST_DROP_USIZE {
|
||||
panic!("called a CEF method on a null object")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue