Skip to content

Instantly share code, notes, and snippets.

U abort@@GLIBC_2.2.5
U __assert_fail@@GLIBC_2.2.5
U cef_add_cross_origin_whitelist_entry
U cef_add_web_plugin_directory
U cef_add_web_plugin_path
U cef_api_hash
U cef_begin_tracing
U cef_binary_value_create
U cef_browser_host_create_browser
U cef_browser_host_create_browser_sync
U cef_api_hash
U cef_browser_host_create_browser_sync
U cef_command_line_get_global
U cef_execute_process
U cef_initialize
U cef_quit_message_loop
U cef_run_message_loop
U cef_shutdown
U cef_string_list_alloc
U cef_string_list_append
#0 0x00007ffff798b830 in rust_fail () from /home/zmike/src/servo/build/x86_64-unknown-linux-gnu/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/bin/../lib/libstd-3e5aeb83-0.9.so
#1 0x00007ffff78e8568 in rt::unwind::Unwinder::begin_unwind::hd890d6617f8679e9HCaO::v0.9 () from /home/zmike/src/servo/build/x86_64-unknown-linux-gnu/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/bin/../lib/libstd-3e5aeb83-0.9.so
#2 0x00007ffff43e1a81 in rt::unwind::begin_unwind::hc1b6d8ec0369022eaC::v0.9 () from /home/zmike/src/servo/build/x86_64-unknown-linux-gnu/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-8b28e8d8-0.9.so
#3 0x00007ffff4a2fe9e in metadata::decoder::lookup_item::h4c5e0ec2b283ef16a1::v0.9 () from /home/zmike/src/servo/build/x86_64-unknown-linux-gnu/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-8b28e8d8-0.9.so
#4 0x00007ffff4a3b8c8 in metadata::decoder::get_struct_fields::hef017a9b6e8d3121az::v0.9 () from /home/zmike/src/servo/build/x86_64-unknown-linux-gnu/s
diff --git a/ports/cef/string.rs b/ports/cef/string.rs
index dd1e7ae..877d6cf 100644
--- a/ports/cef/string.rs
+++ b/ports/cef/string.rs
@@ -97,11 +97,16 @@ pub extern "C" fn cef_string_utf8_set(src: *const u8, src_len: size_t, output: *
pub extern "C" fn cef_string_utf8_to_utf16(src: *const u8, src_len: size_t, output: *mut cef_string_utf16_t) -> c
unsafe {
slice::raw::buf_as_slice(src, src_len as uint, |result| {
- let enc = str::from_utf8(result).unwrap().utf16_units().collect::<Vec<u16>>();
- cef_string_utf16_set(enc.as_ptr(), enc.len() as size_t, output, 1);
@zmike
zmike / gist:1d6d825e9855e45089bb
Created October 22, 2014 00:07
servo build error
string_map.rs:43:33: 43:45 error: mismatched types: expected `&str`, found `&&str` (expected str, found &-ptr)
string_map.rs:43 (*v).insert(&(k.clone()), csv);
^~~~~~~~~~~~
string_map.rs:58:34: 58:40 error: cannot infer an appropriate lifetime for automatic coercion due to conflicting requirements
string_map.rs:58 match str::from_utf8(result) {
^~~~~~
string_map.rs:60:38: 60:39 note: first, the lifetime cannot outlive the expression at 60:37...
string_map.rs:60 match (*v).find(&k) {
^
string_map.rs:60:38: 60:39 note: ...so type `&str` of expression is valid during the expression
core.rs:33:25: 33:34 error: type `extern "C" fn(*mut types::cef_browser_process_handler)` does not implement any method in scope named `is_null`
core.rs:33 if !hcb.is_null() {
^~~~~~~~~
error: aborting due to previous error
Could not compile `embedding`.
symbol lookup error: ./ports/cef/target/libembedding-1dacff6a4ef087eb.so: undefined symbol: _ZN2io25IoFactory.rtio..IoFactory11tcp_connect20h691f409fab6a39c85SdE
symbol lookup error: ./ports/cef/target/libembedding-1dacff6a4ef087eb.so: undefined symbol: _ZN2io2fs11File.Reader4read20h230594e877fbbd5b4TiE
extern int cef_browser_host_create_browser() __attribute__((weak));
int
main()
{
cef_browser_host_create_browser();
return 0;
}
@zmike
zmike / gist:d09c7f76d9547dcaf304
Last active August 29, 2015 14:09
cef_test_alloc.c
/* 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/. */
#ifdef __GNUC__
#define WEAK __attribute__((weak))
#elif defined(__clang__)
#define WEAK __attribute__((weak_import))
#endif