Skip to content
This repository was archived by the owner on Nov 12, 2022. It is now read-only.

Remove unsafe_no_drop_flag #298

Merged
merged 1 commit into from
Aug 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ language: rust
sudo: 9000
dist: trusty
rust:
- nightly-2016-08-23
- nightly
os:
- linux
- osx
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ environment:
install:
- ps: Start-FileDownload "http://servo-rust.s3.amazonaws.com/build/MozillaBuildSetup-2.2.0.exe"
- ps: .\MozillaBuildSetup-2.2.0.exe /S | Out-Null
- ps: Start-FileDownload "https://static.rust-lang.org/dist/2016-08-23/rust-${env:TARGET}.exe" -FileName "rust-install.exe"
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:TARGET}.exe" -FileName "rust-install.exe"
- ps: .\rust-install.exe /VERYSILENT /NORESTART /DIR="C:\rust" | Out-Null
- ps: $env:PATH="$env:PATH;C:\rust\bin"
# I can't make this work with a multi-line script (e.g. via |+ etc.), so we copy the if before every command
1 change: 0 additions & 1 deletion etc/bindings.sh
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@ $BINDGEN \
${EXTRA_FLAGS} \
-no-class-constants \
-no-type-renaming \
-dtor-attr unsafe_no_drop_flag \
-blacklist-type DefaultHasher \
-blacklist-type Heap \
-blacklist-type AutoHashMapRooter \
44 changes: 0 additions & 44 deletions src/jsapi_linux_32.rs
Original file line number Diff line number Diff line change
@@ -161,7 +161,6 @@ impl TempAllocPolicy {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct LinkedListElement<T> {
pub mNext: *mut LinkedListElement<T>,
@@ -174,7 +173,6 @@ pub const NODE_KIND_SENTINEL: LinkedListElement_NodeKind =
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum LinkedListElement_NodeKind { NODE_KIND_NORMAL = 0, }
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct LinkedList<T> {
pub sentinel: LinkedListElement<T>,
@@ -185,7 +183,6 @@ pub struct LinkedList_Iterator<T> {
pub mCurrent: *mut T,
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoCleanLinkedList<T> {
pub _base: LinkedList<T>,
@@ -362,7 +359,6 @@ fn bindgen_test_layout_Runtime() {
assert_eq!(::std::mem::align_of::<Runtime>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoGCRooter {
pub down: *mut AutoGCRooter,
@@ -411,7 +407,6 @@ pub enum StackKind {
}
pub type RootedListHeads = ::std::os::raw::c_void;
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct RootLists {
pub stackRoots_: [u32; 12usize],
pub autoGCRooters_: *mut AutoGCRooter,
@@ -449,7 +444,6 @@ impl RootLists {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct ContextFriendFields {
pub runtime_: *mut JSRuntime,
pub compartment_: *mut JSCompartment,
@@ -463,7 +457,6 @@ fn bindgen_test_layout_ContextFriendFields() {
}
pub enum PerThreadData { }
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct PerThreadDataFriendFields {
pub roots: RootLists,
pub nativeStackLimit: [usize; 3usize],
@@ -515,7 +508,6 @@ impl ::std::clone::Clone for MallocAllocPolicy {
pub enum VectorTesting { }
pub enum Cell { }
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct Zone {
pub runtime_: *mut JSRuntime,
pub barrierTracer_: *mut JSTracer,
@@ -715,7 +707,6 @@ pub type GCNurseryCollectionCallback =
reason: Reason)>;
/** Ensure that generational GC is disabled within some scope. */
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoDisableGenerationalGC {
pub gc: *mut GCRuntime,
@@ -730,7 +721,6 @@ fn bindgen_test_layout_AutoDisableGenerationalGC() {
* the static rooting hazard analysis.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoAssertOnGC;
/**
@@ -785,7 +775,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() {
* heap.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoCheckCannotGC {
pub _base: AutoAssertOnGC,
@@ -904,7 +893,6 @@ impl CallbackTracer {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoTracingName {
pub trc_: *mut CallbackTracer,
@@ -916,7 +904,6 @@ fn bindgen_test_layout_AutoTracingName() {
assert_eq!(::std::mem::align_of::<AutoTracingName>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoTracingIndex {
pub trc_: *mut CallbackTracer,
@@ -927,7 +914,6 @@ fn bindgen_test_layout_AutoTracingIndex() {
assert_eq!(::std::mem::align_of::<AutoTracingIndex>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoTracingDetails {
pub trc_: *mut CallbackTracer,
@@ -1089,7 +1075,6 @@ pub struct DispatchWrapper<T> {
* specialization, define a RootedBase<T> specialization containing them.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct Rooted<T> {
pub _base: RootedBase<T>,
@@ -1158,15 +1143,13 @@ pub enum AllowGC { NoGC = 0, CanGC = 1, }
* marked when the object itself is marked.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct PersistentRooted<T> {
pub _base: PersistentRootedBase<T>,
pub _base1: LinkedListElement<T>,
pub ptr: T,
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct ObjectPtr {
pub value: Heap<*mut JSObject>,
}
@@ -1931,7 +1914,6 @@ pub type UnwatchOp =
obj: HandleObject,
id: HandleId) -> bool>;
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct ElementAdder {
pub resObj_: RootedObject,
@@ -2318,7 +2300,6 @@ fn bindgen_test_layout_JSStructuredCloneCallbacks() {
}
/** RAII sugar for JS_WriteStructuredClone. */
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSAutoStructuredCloneBuffer {
pub data_: *mut u64,
@@ -2512,7 +2493,6 @@ impl JSAutoStructuredCloneBuffer {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSPrincipals {
pub _vftable: *const _vftable_JSPrincipals,
@@ -2562,14 +2542,12 @@ pub type JSReadPrincipalsOp =
-> bool>;
pub enum TwoByteChars { }
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoVectorRooterBase<T> {
pub _base: AutoGCRooter,
pub _phantom0: ::std::marker::PhantomData<T>,
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoVectorRooter<T> {
pub _base: AutoVectorRooterBase<T>,
@@ -2584,7 +2562,6 @@ pub type StringVector = ::std::os::raw::c_void;
* Custom rooting behavior for internal and external clients.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct CustomAutoRooter {
pub _vftable: *const _vftable_CustomAutoRooter,
@@ -2838,7 +2815,6 @@ pub type JSCompartmentNameCallback =
* JS::Compile(cx, options, srcBuf);
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct SourceBufferHolder {
pub data_: *const ::std::os::raw::c_ushort,
@@ -2856,7 +2832,6 @@ fn bindgen_test_layout_SourceBufferHolder() {
pub type JS_CurrentEmbedderTimeFunction =
::std::option::Option<unsafe extern "C" fn() -> f64>;
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSAutoRequest {
pub mContext: *mut JSContext,
@@ -3029,7 +3004,6 @@ fn bindgen_test_layout_RuntimeOptions() {
assert_eq!(::std::mem::align_of::<RuntimeOptions>() , 1usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSAutoCompartment {
pub cx_: *mut JSContext,
@@ -3041,7 +3015,6 @@ fn bindgen_test_layout_JSAutoCompartment() {
assert_eq!(::std::mem::align_of::<JSAutoCompartment>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSAutoNullableCompartment {
pub cx_: *mut JSContext,
@@ -3536,7 +3509,6 @@ pub enum PromiseState { Pending = 0, Fulfilled = 1, Rejected = 2, }
* stack frames.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoSetAsyncStackForNewCalls {
pub cx: *mut JSContext,
@@ -3558,7 +3530,6 @@ fn bindgen_test_layout_AutoSetAsyncStackForNewCalls() {
4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSAutoByteString {
pub mBytes: *mut ::std::os::raw::c_char,
@@ -3689,7 +3660,6 @@ pub type WarningReporter =
* return ok;
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoSaveExceptionState {
pub context: *mut JSContext,
@@ -3730,7 +3700,6 @@ pub enum JSJitCompilerOption {
}
pub enum ScriptSource { }
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoFilename {
pub ss_: *mut ScriptSource,
@@ -3783,7 +3752,6 @@ impl AutoFilename {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoHideScriptedCaller {
pub mContext: *mut JSContext,
@@ -3882,7 +3850,6 @@ fn bindgen_test_layout_AsmJSCacheOps() {
* }
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct ForOfIterator {
pub cx_: *mut JSContext,
@@ -4227,7 +4194,6 @@ fn bindgen_test_layout_JSFunctionSpecWithHelp() {
* find the source.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct SourceHook {
pub _vftable: *const _vftable_SourceHook,
@@ -4537,7 +4503,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() {
assert_eq!(::std::mem::align_of::<CompartmentsWithPrincipals>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct ExpandoAndGeneration {
pub expando: Heap<Value>,
pub generation: u64,
@@ -5347,7 +5312,6 @@ pub type CTypesActivityCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
type_: CTypesActivityType)>;
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoCTypesActivityCallback {
pub cx: *mut JSContext,
@@ -5377,7 +5341,6 @@ fn bindgen_test_layout_AllocationMetadataBuilder() {
assert_eq!(::std::mem::align_of::<AllocationMetadataBuilder>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct NativeProfiler {
pub _vftable: *const _vftable_NativeProfiler,
@@ -5397,7 +5360,6 @@ fn bindgen_test_layout_NativeProfiler() {
assert_eq!(::std::mem::align_of::<NativeProfiler>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct GCHeapProfiler {
pub _vftable: *const _vftable_GCHeapProfiler,
@@ -5631,7 +5593,6 @@ fn bindgen_test_layout_ClassInfo() {
* holds a copy of the filename.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct NotableClassInfo {
pub _base: ClassInfo,
@@ -5716,7 +5677,6 @@ fn bindgen_test_layout_StringInfo() {
* NotableStringInfo holds a copy of some or all of the string's chars.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct NotableStringInfo {
pub _base: StringInfo,
@@ -5755,7 +5715,6 @@ fn bindgen_test_layout_ScriptSourceInfo() {
* class holds a copy of the filename.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct NotableScriptSourceInfo {
pub _base: ScriptSourceInfo,
@@ -5771,7 +5730,6 @@ fn bindgen_test_layout_NotableScriptSourceInfo() {
* compartments within it.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct RuntimeSizes {
pub object: usize,
pub atomsTable: usize,
@@ -5816,7 +5774,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() {
assert_eq!(::std::mem::align_of::<UnusedGCThingSizes>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct ZoneStats {
pub symbolsGCHeap: usize,
pub gcHeapArenaAdmin: usize,
@@ -5851,7 +5808,6 @@ impl ZoneStats {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct CompartmentStats {
pub objectsPrivate: usize,
pub scriptsGCHeap: usize,
Loading