зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1469766 - Update OOM hook on rustc 1.28 after rust PR 51543. r=froydnj
--HG-- extra : rebase_source : ac43ba616b4ed00f54b8c79f909174f8603604c6
This commit is contained in:
Родитель
e5e443cd1b
Коммит
0d05f8f1bc
|
@ -431,7 +431,7 @@ linux64-rust-nightly:
|
|||
using: toolchain-script
|
||||
script: repack_rust.py
|
||||
arguments: [
|
||||
'--channel', 'nightly-2018-06-13',
|
||||
'--channel', 'nightly-2018-06-20',
|
||||
'--host', 'x86_64-unknown-linux-gnu',
|
||||
'--target', 'x86_64-unknown-linux-gnu',
|
||||
'--target', 'i686-unknown-linux-gnu',
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#![cfg_attr(feature = "oom_with_global_alloc",
|
||||
feature(global_allocator, alloc, alloc_system, allocator_api))]
|
||||
#![cfg_attr(feature = "oom_with_hook", feature(oom_hook))]
|
||||
#![cfg_attr(feature = "oom_with_hook", feature(alloc_error_hook))]
|
||||
|
||||
#[cfg(feature="servo")]
|
||||
extern crate geckoservo;
|
||||
|
@ -222,7 +222,7 @@ static HEAP: global_alloc::GeckoHeap = global_alloc::GeckoHeap;
|
|||
|
||||
#[cfg(feature = "oom_with_hook")]
|
||||
mod oom_hook {
|
||||
use std::alloc::{Layout, set_oom_hook};
|
||||
use std::alloc::{Layout, set_alloc_error_hook};
|
||||
|
||||
extern "C" {
|
||||
fn GeckoHandleOOM(size: usize) -> !;
|
||||
|
@ -235,7 +235,7 @@ mod oom_hook {
|
|||
}
|
||||
|
||||
pub fn install() {
|
||||
set_oom_hook(hook);
|
||||
set_alloc_error_hook(hook);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче