From 3ae440aa5900a8b3826f72c8e398e6be8c627f0c Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Fri, 26 Aug 2016 16:13:48 +0200 Subject: [PATCH] Remove unsafe_no_drop_flag --- .travis.yml | 2 +- appveyor.yml | 2 +- etc/bindings.sh | 1 - src/jsapi_linux_32.rs | 44 ----------------------------- src/jsapi_linux_32_debug.rs | 47 ------------------------------- src/jsapi_linux_64.rs | 44 ----------------------------- src/jsapi_linux_64_debug.rs | 47 ------------------------------- src/jsapi_macos_64.rs | 44 ----------------------------- src/jsapi_macos_64_debug.rs | 47 ------------------------------- src/jsapi_windows_gcc_64.rs | 44 ----------------------------- src/jsapi_windows_gcc_64_debug.rs | 47 ------------------------------- src/lib.rs | 2 -- src/rust.rs | 11 +------- 13 files changed, 3 insertions(+), 379 deletions(-) diff --git a/.travis.yml b/.travis.yml index 07cfdcc3f..634262300 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: rust sudo: 9000 dist: trusty rust: - - nightly-2016-08-23 + - nightly os: - linux - osx diff --git a/appveyor.yml b/appveyor.yml index a62f711ad..017a1e174 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 diff --git a/etc/bindings.sh b/etc/bindings.sh index ba1c59b79..be186e0e4 100755 --- a/etc/bindings.sh +++ b/etc/bindings.sh @@ -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 \ diff --git a/src/jsapi_linux_32.rs b/src/jsapi_linux_32.rs index abb531ea7..b62ff0618 100644 --- a/src/jsapi_linux_32.rs +++ b/src/jsapi_linux_32.rs @@ -161,7 +161,6 @@ impl TempAllocPolicy { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct LinkedListElement { pub mNext: *mut LinkedListElement, @@ -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 { pub sentinel: LinkedListElement, @@ -185,7 +183,6 @@ pub struct LinkedList_Iterator { pub mCurrent: *mut T, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCleanLinkedList { pub _base: LinkedList, @@ -362,7 +359,6 @@ fn bindgen_test_layout_Runtime() { assert_eq!(::std::mem::align_of::() , 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::() , 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::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingDetails { pub trc_: *mut CallbackTracer, @@ -1089,7 +1075,6 @@ pub struct DispatchWrapper { * specialization, define a RootedBase specialization containing them. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct Rooted { pub _base: RootedBase, @@ -1158,7 +1143,6 @@ 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 { pub _base: PersistentRootedBase, @@ -1166,7 +1150,6 @@ pub struct PersistentRooted { 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 { pub _base: AutoGCRooter, pub _phantom0: ::std::marker::PhantomData, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooter { pub _base: AutoVectorRooterBase, @@ -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 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::() , 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::() , 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::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ExpandoAndGeneration { pub expando: Heap, pub generation: u64, @@ -5347,7 +5312,6 @@ pub type CTypesActivityCallback = ::std::option::Option; #[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::() , 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::() , 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::() , 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, diff --git a/src/jsapi_linux_32_debug.rs b/src/jsapi_linux_32_debug.rs index e8c32d456..0a0bedd6d 100644 --- a/src/jsapi_linux_32_debug.rs +++ b/src/jsapi_linux_32_debug.rs @@ -162,7 +162,6 @@ impl TempAllocPolicy { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct LinkedListElement { pub mNext: *mut LinkedListElement, @@ -175,7 +174,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 { pub sentinel: LinkedListElement, @@ -186,7 +184,6 @@ pub struct LinkedList_Iterator { pub mCurrent: *mut T, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCleanLinkedList { pub _base: LinkedList, @@ -363,7 +360,6 @@ fn bindgen_test_layout_Runtime() { assert_eq!(::std::mem::align_of::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoGCRooter { pub down: *mut AutoGCRooter, @@ -412,7 +408,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, @@ -450,7 +445,6 @@ impl RootLists { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ContextFriendFields { pub runtime_: *mut JSRuntime, pub compartment_: *mut JSCompartment, @@ -464,7 +458,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], @@ -517,7 +510,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, @@ -717,7 +709,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, @@ -732,7 +723,6 @@ fn bindgen_test_layout_AutoDisableGenerationalGC() { * the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertOnGC; /** @@ -740,7 +730,6 @@ pub struct AutoAssertOnGC; * class does not disable the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertNoAlloc { pub gc: *mut GCRuntime, @@ -777,7 +766,6 @@ impl AutoAssertNoAlloc { * on this class. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSuppressGCAnalysis { pub _base: AutoAssertNoAlloc, @@ -807,7 +795,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() { * heap. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckCannotGC { pub _base: AutoAssertOnGC, @@ -926,7 +913,6 @@ impl CallbackTracer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingName { pub trc_: *mut CallbackTracer, @@ -938,7 +924,6 @@ fn bindgen_test_layout_AutoTracingName() { assert_eq!(::std::mem::align_of::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingIndex { pub trc_: *mut CallbackTracer, @@ -949,7 +934,6 @@ fn bindgen_test_layout_AutoTracingIndex() { assert_eq!(::std::mem::align_of::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingDetails { pub trc_: *mut CallbackTracer, @@ -1111,7 +1095,6 @@ pub struct DispatchWrapper { * specialization, define a RootedBase specialization containing them. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct Rooted { pub _base: RootedBase, @@ -1180,7 +1163,6 @@ 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 { pub _base: PersistentRootedBase, @@ -1188,7 +1170,6 @@ pub struct PersistentRooted { pub ptr: T, } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ObjectPtr { pub value: Heap<*mut JSObject>, } @@ -1988,7 +1969,6 @@ pub type UnwatchOp = obj: HandleObject, id: HandleId) -> bool>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ElementAdder { pub resObj_: RootedObject, @@ -2375,7 +2355,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, @@ -2569,7 +2548,6 @@ impl JSAutoStructuredCloneBuffer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSPrincipals { pub _vftable: *const _vftable_JSPrincipals, @@ -2620,7 +2598,6 @@ pub type JSReadPrincipalsOp = -> bool>; pub enum TwoByteChars { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckRequestDepth { pub cx: *mut JSContext, @@ -2631,14 +2608,12 @@ fn bindgen_test_layout_AutoCheckRequestDepth() { assert_eq!(::std::mem::align_of::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooterBase { pub _base: AutoGCRooter, pub _phantom0: ::std::marker::PhantomData, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooter { pub _base: AutoVectorRooterBase, @@ -2653,7 +2628,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, @@ -2907,7 +2881,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, @@ -2925,7 +2898,6 @@ fn bindgen_test_layout_SourceBufferHolder() { pub type JS_CurrentEmbedderTimeFunction = ::std::option::Option f64>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoRequest { pub mContext: *mut JSContext, @@ -3098,7 +3070,6 @@ fn bindgen_test_layout_RuntimeOptions() { assert_eq!(::std::mem::align_of::() , 1usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoCompartment { pub cx_: *mut JSContext, @@ -3110,7 +3081,6 @@ fn bindgen_test_layout_JSAutoCompartment() { assert_eq!(::std::mem::align_of::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoNullableCompartment { pub cx_: *mut JSContext, @@ -3605,7 +3575,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, @@ -3627,7 +3596,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, @@ -3758,7 +3726,6 @@ pub type WarningReporter = * return ok; */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSaveExceptionState { pub context: *mut JSContext, @@ -3799,7 +3766,6 @@ pub enum JSJitCompilerOption { } pub enum ScriptSource { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoFilename { pub ss_: *mut ScriptSource, @@ -3852,7 +3818,6 @@ impl AutoFilename { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoHideScriptedCaller { pub mContext: *mut JSContext, @@ -3951,7 +3916,6 @@ fn bindgen_test_layout_AsmJSCacheOps() { * } */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ForOfIterator { pub cx_: *mut JSContext, @@ -4296,7 +4260,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, @@ -4606,7 +4569,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() { assert_eq!(::std::mem::align_of::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ExpandoAndGeneration { pub expando: Heap, pub generation: u64, @@ -5416,7 +5378,6 @@ pub type CTypesActivityCallback = ::std::option::Option; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCTypesActivityCallback { pub cx: *mut JSContext, @@ -5446,7 +5407,6 @@ fn bindgen_test_layout_AllocationMetadataBuilder() { assert_eq!(::std::mem::align_of::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct NativeProfiler { pub _vftable: *const _vftable_NativeProfiler, @@ -5466,7 +5426,6 @@ fn bindgen_test_layout_NativeProfiler() { assert_eq!(::std::mem::align_of::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct GCHeapProfiler { pub _vftable: *const _vftable_GCHeapProfiler, @@ -5700,7 +5659,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, @@ -5785,7 +5743,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, @@ -5824,7 +5781,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, @@ -5840,7 +5796,6 @@ fn bindgen_test_layout_NotableScriptSourceInfo() { * compartments within it. */ #[repr(C)] -#[unsafe_no_drop_flag] pub struct RuntimeSizes { pub object: usize, pub atomsTable: usize, @@ -5885,7 +5840,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() { assert_eq!(::std::mem::align_of::() , 4usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ZoneStats { pub symbolsGCHeap: usize, pub gcHeapArenaAdmin: usize, @@ -5920,7 +5874,6 @@ impl ZoneStats { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct CompartmentStats { pub objectsPrivate: usize, pub scriptsGCHeap: usize, diff --git a/src/jsapi_linux_64.rs b/src/jsapi_linux_64.rs index e22b85ddd..b20739008 100644 --- a/src/jsapi_linux_64.rs +++ b/src/jsapi_linux_64.rs @@ -162,7 +162,6 @@ impl TempAllocPolicy { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct LinkedListElement { pub mNext: *mut LinkedListElement, @@ -175,7 +174,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 { pub sentinel: LinkedListElement, @@ -186,7 +184,6 @@ pub struct LinkedList_Iterator { pub mCurrent: *mut T, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCleanLinkedList { pub _base: LinkedList, @@ -363,7 +360,6 @@ fn bindgen_test_layout_Runtime() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoGCRooter { pub down: *mut AutoGCRooter, @@ -412,7 +408,6 @@ pub enum StackKind { } pub type RootedListHeads = ::std::os::raw::c_void; #[repr(C)] -#[unsafe_no_drop_flag] pub struct RootLists { pub stackRoots_: [u64; 12usize], pub autoGCRooters_: *mut AutoGCRooter, @@ -450,7 +445,6 @@ impl RootLists { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ContextFriendFields { pub runtime_: *mut JSRuntime, pub compartment_: *mut JSCompartment, @@ -464,7 +458,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], @@ -516,7 +509,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, @@ -716,7 +708,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, @@ -731,7 +722,6 @@ fn bindgen_test_layout_AutoDisableGenerationalGC() { * the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertOnGC; /** @@ -786,7 +776,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() { * heap. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckCannotGC { pub _base: AutoAssertOnGC, @@ -892,7 +881,6 @@ impl CallbackTracer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingName { pub trc_: *mut CallbackTracer, @@ -904,7 +892,6 @@ fn bindgen_test_layout_AutoTracingName() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingIndex { pub trc_: *mut CallbackTracer, @@ -915,7 +902,6 @@ fn bindgen_test_layout_AutoTracingIndex() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingDetails { pub trc_: *mut CallbackTracer, @@ -1077,7 +1063,6 @@ pub struct DispatchWrapper { * specialization, define a RootedBase specialization containing them. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct Rooted { pub _base: RootedBase, @@ -1146,7 +1131,6 @@ 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 { pub _base: PersistentRootedBase, @@ -1154,7 +1138,6 @@ pub struct PersistentRooted { pub ptr: T, } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ObjectPtr { pub value: Heap<*mut JSObject>, } @@ -1892,7 +1875,6 @@ pub type UnwatchOp = obj: HandleObject, id: HandleId) -> bool>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ElementAdder { pub resObj_: RootedObject, @@ -2279,7 +2261,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, @@ -2473,7 +2454,6 @@ impl JSAutoStructuredCloneBuffer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSPrincipals { pub _vftable: *const _vftable_JSPrincipals, @@ -2523,14 +2503,12 @@ pub type JSReadPrincipalsOp = -> bool>; pub enum TwoByteChars { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooterBase { pub _base: AutoGCRooter, pub _phantom0: ::std::marker::PhantomData, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooter { pub _base: AutoVectorRooterBase, @@ -2545,7 +2523,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, @@ -2799,7 +2776,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, @@ -2817,7 +2793,6 @@ fn bindgen_test_layout_SourceBufferHolder() { pub type JS_CurrentEmbedderTimeFunction = ::std::option::Option f64>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoRequest { pub mContext: *mut JSContext, @@ -2990,7 +2965,6 @@ fn bindgen_test_layout_RuntimeOptions() { assert_eq!(::std::mem::align_of::() , 1usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoCompartment { pub cx_: *mut JSContext, @@ -3002,7 +2976,6 @@ fn bindgen_test_layout_JSAutoCompartment() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoNullableCompartment { pub cx_: *mut JSContext, @@ -3497,7 +3470,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, @@ -3519,7 +3491,6 @@ fn bindgen_test_layout_AutoSetAsyncStackForNewCalls() { 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoByteString { pub mBytes: *mut ::std::os::raw::c_char, @@ -3650,7 +3621,6 @@ pub type WarningReporter = * return ok; */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSaveExceptionState { pub context: *mut JSContext, @@ -3691,7 +3661,6 @@ pub enum JSJitCompilerOption { } pub enum ScriptSource { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoFilename { pub ss_: *mut ScriptSource, @@ -3744,7 +3713,6 @@ impl AutoFilename { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoHideScriptedCaller { pub mContext: *mut JSContext, @@ -3843,7 +3811,6 @@ fn bindgen_test_layout_AsmJSCacheOps() { * } */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ForOfIterator { pub cx_: *mut JSContext, @@ -4188,7 +4155,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, @@ -4478,7 +4444,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ExpandoAndGeneration { pub expando: Heap, pub generation: u64, @@ -5275,7 +5240,6 @@ pub type CTypesActivityCallback = ::std::option::Option; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCTypesActivityCallback { pub cx: *mut JSContext, @@ -5294,7 +5258,6 @@ impl ::std::clone::Clone for AllocationMetadataBuilder { fn clone(&self) -> Self { *self } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct NativeProfiler { pub _vftable: *const _vftable_NativeProfiler, @@ -5314,7 +5277,6 @@ fn bindgen_test_layout_NativeProfiler() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct GCHeapProfiler { pub _vftable: *const _vftable_GCHeapProfiler, @@ -5548,7 +5510,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, @@ -5633,7 +5594,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, @@ -5672,7 +5632,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, @@ -5688,7 +5647,6 @@ fn bindgen_test_layout_NotableScriptSourceInfo() { * compartments within it. */ #[repr(C)] -#[unsafe_no_drop_flag] pub struct RuntimeSizes { pub object: usize, pub atomsTable: usize, @@ -5733,7 +5691,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ZoneStats { pub symbolsGCHeap: usize, pub gcHeapArenaAdmin: usize, @@ -5768,7 +5725,6 @@ impl ZoneStats { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct CompartmentStats { pub objectsPrivate: usize, pub scriptsGCHeap: usize, diff --git a/src/jsapi_linux_64_debug.rs b/src/jsapi_linux_64_debug.rs index 231c62d80..d2a8a88fc 100644 --- a/src/jsapi_linux_64_debug.rs +++ b/src/jsapi_linux_64_debug.rs @@ -163,7 +163,6 @@ impl TempAllocPolicy { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct LinkedListElement { pub mNext: *mut LinkedListElement, @@ -176,7 +175,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 { pub sentinel: LinkedListElement, @@ -187,7 +185,6 @@ pub struct LinkedList_Iterator { pub mCurrent: *mut T, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCleanLinkedList { pub _base: LinkedList, @@ -364,7 +361,6 @@ fn bindgen_test_layout_Runtime() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoGCRooter { pub down: *mut AutoGCRooter, @@ -413,7 +409,6 @@ pub enum StackKind { } pub type RootedListHeads = ::std::os::raw::c_void; #[repr(C)] -#[unsafe_no_drop_flag] pub struct RootLists { pub stackRoots_: [u64; 12usize], pub autoGCRooters_: *mut AutoGCRooter, @@ -451,7 +446,6 @@ impl RootLists { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ContextFriendFields { pub runtime_: *mut JSRuntime, pub compartment_: *mut JSCompartment, @@ -465,7 +459,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], @@ -518,7 +511,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, @@ -718,7 +710,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, @@ -733,7 +724,6 @@ fn bindgen_test_layout_AutoDisableGenerationalGC() { * the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertOnGC; /** @@ -741,7 +731,6 @@ pub struct AutoAssertOnGC; * class does not disable the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertNoAlloc { pub gc: *mut GCRuntime, @@ -778,7 +767,6 @@ impl AutoAssertNoAlloc { * on this class. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSuppressGCAnalysis { pub _base: AutoAssertNoAlloc, @@ -808,7 +796,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() { * heap. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckCannotGC { pub _base: AutoAssertOnGC, @@ -914,7 +901,6 @@ impl CallbackTracer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingName { pub trc_: *mut CallbackTracer, @@ -926,7 +912,6 @@ fn bindgen_test_layout_AutoTracingName() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingIndex { pub trc_: *mut CallbackTracer, @@ -937,7 +922,6 @@ fn bindgen_test_layout_AutoTracingIndex() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingDetails { pub trc_: *mut CallbackTracer, @@ -1099,7 +1083,6 @@ pub struct DispatchWrapper { * specialization, define a RootedBase specialization containing them. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct Rooted { pub _base: RootedBase, @@ -1168,7 +1151,6 @@ 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 { pub _base: PersistentRootedBase, @@ -1176,7 +1158,6 @@ pub struct PersistentRooted { pub ptr: T, } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ObjectPtr { pub value: Heap<*mut JSObject>, } @@ -1949,7 +1930,6 @@ pub type UnwatchOp = obj: HandleObject, id: HandleId) -> bool>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ElementAdder { pub resObj_: RootedObject, @@ -2336,7 +2316,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, @@ -2530,7 +2509,6 @@ impl JSAutoStructuredCloneBuffer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSPrincipals { pub _vftable: *const _vftable_JSPrincipals, @@ -2581,7 +2559,6 @@ pub type JSReadPrincipalsOp = -> bool>; pub enum TwoByteChars { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckRequestDepth { pub cx: *mut JSContext, @@ -2592,14 +2569,12 @@ fn bindgen_test_layout_AutoCheckRequestDepth() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooterBase { pub _base: AutoGCRooter, pub _phantom0: ::std::marker::PhantomData, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooter { pub _base: AutoVectorRooterBase, @@ -2614,7 +2589,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, @@ -2868,7 +2842,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, @@ -2886,7 +2859,6 @@ fn bindgen_test_layout_SourceBufferHolder() { pub type JS_CurrentEmbedderTimeFunction = ::std::option::Option f64>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoRequest { pub mContext: *mut JSContext, @@ -3059,7 +3031,6 @@ fn bindgen_test_layout_RuntimeOptions() { assert_eq!(::std::mem::align_of::() , 1usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoCompartment { pub cx_: *mut JSContext, @@ -3071,7 +3042,6 @@ fn bindgen_test_layout_JSAutoCompartment() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoNullableCompartment { pub cx_: *mut JSContext, @@ -3566,7 +3536,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, @@ -3588,7 +3557,6 @@ fn bindgen_test_layout_AutoSetAsyncStackForNewCalls() { 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoByteString { pub mBytes: *mut ::std::os::raw::c_char, @@ -3719,7 +3687,6 @@ pub type WarningReporter = * return ok; */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSaveExceptionState { pub context: *mut JSContext, @@ -3760,7 +3727,6 @@ pub enum JSJitCompilerOption { } pub enum ScriptSource { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoFilename { pub ss_: *mut ScriptSource, @@ -3813,7 +3779,6 @@ impl AutoFilename { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoHideScriptedCaller { pub mContext: *mut JSContext, @@ -3912,7 +3877,6 @@ fn bindgen_test_layout_AsmJSCacheOps() { * } */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ForOfIterator { pub cx_: *mut JSContext, @@ -4257,7 +4221,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, @@ -4547,7 +4510,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ExpandoAndGeneration { pub expando: Heap, pub generation: u64, @@ -5344,7 +5306,6 @@ pub type CTypesActivityCallback = ::std::option::Option; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCTypesActivityCallback { pub cx: *mut JSContext, @@ -5363,7 +5324,6 @@ impl ::std::clone::Clone for AllocationMetadataBuilder { fn clone(&self) -> Self { *self } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct NativeProfiler { pub _vftable: *const _vftable_NativeProfiler, @@ -5383,7 +5343,6 @@ fn bindgen_test_layout_NativeProfiler() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct GCHeapProfiler { pub _vftable: *const _vftable_GCHeapProfiler, @@ -5617,7 +5576,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, @@ -5702,7 +5660,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, @@ -5741,7 +5698,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, @@ -5757,7 +5713,6 @@ fn bindgen_test_layout_NotableScriptSourceInfo() { * compartments within it. */ #[repr(C)] -#[unsafe_no_drop_flag] pub struct RuntimeSizes { pub object: usize, pub atomsTable: usize, @@ -5802,7 +5757,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ZoneStats { pub symbolsGCHeap: usize, pub gcHeapArenaAdmin: usize, @@ -5837,7 +5791,6 @@ impl ZoneStats { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct CompartmentStats { pub objectsPrivate: usize, pub scriptsGCHeap: usize, diff --git a/src/jsapi_macos_64.rs b/src/jsapi_macos_64.rs index 97499e1b5..6701214de 100644 --- a/src/jsapi_macos_64.rs +++ b/src/jsapi_macos_64.rs @@ -162,7 +162,6 @@ impl TempAllocPolicy { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct LinkedListElement { pub mNext: *mut LinkedListElement, @@ -175,7 +174,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 { pub sentinel: LinkedListElement, @@ -186,7 +184,6 @@ pub struct LinkedList_Iterator { pub mCurrent: *mut T, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCleanLinkedList { pub _base: LinkedList, @@ -363,7 +360,6 @@ fn bindgen_test_layout_Runtime() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoGCRooter { pub down: *mut AutoGCRooter, @@ -412,7 +408,6 @@ pub enum StackKind { } pub type RootedListHeads = ::std::os::raw::c_void; #[repr(C)] -#[unsafe_no_drop_flag] pub struct RootLists { pub stackRoots_: [u64; 12usize], pub autoGCRooters_: *mut AutoGCRooter, @@ -450,7 +445,6 @@ impl RootLists { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ContextFriendFields { pub runtime_: *mut JSRuntime, pub compartment_: *mut JSCompartment, @@ -464,7 +458,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], @@ -516,7 +509,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, @@ -716,7 +708,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, @@ -731,7 +722,6 @@ fn bindgen_test_layout_AutoDisableGenerationalGC() { * the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertOnGC; /** @@ -786,7 +776,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() { * heap. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckCannotGC { pub _base: AutoAssertOnGC, @@ -892,7 +881,6 @@ impl CallbackTracer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingName { pub trc_: *mut CallbackTracer, @@ -904,7 +892,6 @@ fn bindgen_test_layout_AutoTracingName() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingIndex { pub trc_: *mut CallbackTracer, @@ -915,7 +902,6 @@ fn bindgen_test_layout_AutoTracingIndex() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingDetails { pub trc_: *mut CallbackTracer, @@ -1077,7 +1063,6 @@ pub struct DispatchWrapper { * specialization, define a RootedBase specialization containing them. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct Rooted { pub _base: RootedBase, @@ -1146,7 +1131,6 @@ 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 { pub _base: PersistentRootedBase, @@ -1154,7 +1138,6 @@ pub struct PersistentRooted { pub ptr: T, } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ObjectPtr { pub value: Heap<*mut JSObject>, } @@ -1892,7 +1875,6 @@ pub type UnwatchOp = obj: HandleObject, id: HandleId) -> bool>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ElementAdder { pub resObj_: RootedObject, @@ -2279,7 +2261,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, @@ -2473,7 +2454,6 @@ impl JSAutoStructuredCloneBuffer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSPrincipals { pub _vftable: *const _vftable_JSPrincipals, @@ -2523,14 +2503,12 @@ pub type JSReadPrincipalsOp = -> bool>; pub enum TwoByteChars { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooterBase { pub _base: AutoGCRooter, pub _phantom0: ::std::marker::PhantomData, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooter { pub _base: AutoVectorRooterBase, @@ -2545,7 +2523,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, @@ -2799,7 +2776,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, @@ -2817,7 +2793,6 @@ fn bindgen_test_layout_SourceBufferHolder() { pub type JS_CurrentEmbedderTimeFunction = ::std::option::Option f64>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoRequest { pub mContext: *mut JSContext, @@ -2990,7 +2965,6 @@ fn bindgen_test_layout_RuntimeOptions() { assert_eq!(::std::mem::align_of::() , 1usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoCompartment { pub cx_: *mut JSContext, @@ -3002,7 +2976,6 @@ fn bindgen_test_layout_JSAutoCompartment() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoNullableCompartment { pub cx_: *mut JSContext, @@ -3497,7 +3470,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, @@ -3519,7 +3491,6 @@ fn bindgen_test_layout_AutoSetAsyncStackForNewCalls() { 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoByteString { pub mBytes: *mut ::std::os::raw::c_char, @@ -3650,7 +3621,6 @@ pub type WarningReporter = * return ok; */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSaveExceptionState { pub context: *mut JSContext, @@ -3691,7 +3661,6 @@ pub enum JSJitCompilerOption { } pub enum ScriptSource { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoFilename { pub ss_: *mut ScriptSource, @@ -3744,7 +3713,6 @@ impl AutoFilename { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoHideScriptedCaller { pub mContext: *mut JSContext, @@ -3843,7 +3811,6 @@ fn bindgen_test_layout_AsmJSCacheOps() { * } */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ForOfIterator { pub cx_: *mut JSContext, @@ -4188,7 +4155,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, @@ -4478,7 +4444,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ExpandoAndGeneration { pub expando: Heap, pub generation: u64, @@ -5275,7 +5240,6 @@ pub type CTypesActivityCallback = ::std::option::Option; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCTypesActivityCallback { pub cx: *mut JSContext, @@ -5294,7 +5258,6 @@ impl ::std::clone::Clone for AllocationMetadataBuilder { fn clone(&self) -> Self { *self } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct NativeProfiler { pub _vftable: *const _vftable_NativeProfiler, @@ -5314,7 +5277,6 @@ fn bindgen_test_layout_NativeProfiler() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct GCHeapProfiler { pub _vftable: *const _vftable_GCHeapProfiler, @@ -5548,7 +5510,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, @@ -5633,7 +5594,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, @@ -5672,7 +5632,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, @@ -5688,7 +5647,6 @@ fn bindgen_test_layout_NotableScriptSourceInfo() { * compartments within it. */ #[repr(C)] -#[unsafe_no_drop_flag] pub struct RuntimeSizes { pub object: usize, pub atomsTable: usize, @@ -5733,7 +5691,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ZoneStats { pub symbolsGCHeap: usize, pub gcHeapArenaAdmin: usize, @@ -5768,7 +5725,6 @@ impl ZoneStats { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct CompartmentStats { pub objectsPrivate: usize, pub scriptsGCHeap: usize, diff --git a/src/jsapi_macos_64_debug.rs b/src/jsapi_macos_64_debug.rs index e9be43591..792c491e3 100644 --- a/src/jsapi_macos_64_debug.rs +++ b/src/jsapi_macos_64_debug.rs @@ -163,7 +163,6 @@ impl TempAllocPolicy { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct LinkedListElement { pub mNext: *mut LinkedListElement, @@ -176,7 +175,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 { pub sentinel: LinkedListElement, @@ -187,7 +185,6 @@ pub struct LinkedList_Iterator { pub mCurrent: *mut T, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCleanLinkedList { pub _base: LinkedList, @@ -364,7 +361,6 @@ fn bindgen_test_layout_Runtime() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoGCRooter { pub down: *mut AutoGCRooter, @@ -413,7 +409,6 @@ pub enum StackKind { } pub type RootedListHeads = ::std::os::raw::c_void; #[repr(C)] -#[unsafe_no_drop_flag] pub struct RootLists { pub stackRoots_: [u64; 12usize], pub autoGCRooters_: *mut AutoGCRooter, @@ -451,7 +446,6 @@ impl RootLists { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ContextFriendFields { pub runtime_: *mut JSRuntime, pub compartment_: *mut JSCompartment, @@ -465,7 +459,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], @@ -518,7 +511,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, @@ -718,7 +710,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, @@ -733,7 +724,6 @@ fn bindgen_test_layout_AutoDisableGenerationalGC() { * the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertOnGC; /** @@ -741,7 +731,6 @@ pub struct AutoAssertOnGC; * class does not disable the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertNoAlloc { pub gc: *mut GCRuntime, @@ -778,7 +767,6 @@ impl AutoAssertNoAlloc { * on this class. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSuppressGCAnalysis { pub _base: AutoAssertNoAlloc, @@ -808,7 +796,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() { * heap. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckCannotGC { pub _base: AutoAssertOnGC, @@ -914,7 +901,6 @@ impl CallbackTracer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingName { pub trc_: *mut CallbackTracer, @@ -926,7 +912,6 @@ fn bindgen_test_layout_AutoTracingName() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingIndex { pub trc_: *mut CallbackTracer, @@ -937,7 +922,6 @@ fn bindgen_test_layout_AutoTracingIndex() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingDetails { pub trc_: *mut CallbackTracer, @@ -1099,7 +1083,6 @@ pub struct DispatchWrapper { * specialization, define a RootedBase specialization containing them. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct Rooted { pub _base: RootedBase, @@ -1168,7 +1151,6 @@ 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 { pub _base: PersistentRootedBase, @@ -1176,7 +1158,6 @@ pub struct PersistentRooted { pub ptr: T, } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ObjectPtr { pub value: Heap<*mut JSObject>, } @@ -1949,7 +1930,6 @@ pub type UnwatchOp = obj: HandleObject, id: HandleId) -> bool>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ElementAdder { pub resObj_: RootedObject, @@ -2336,7 +2316,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, @@ -2530,7 +2509,6 @@ impl JSAutoStructuredCloneBuffer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSPrincipals { pub _vftable: *const _vftable_JSPrincipals, @@ -2581,7 +2559,6 @@ pub type JSReadPrincipalsOp = -> bool>; pub enum TwoByteChars { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckRequestDepth { pub cx: *mut JSContext, @@ -2592,14 +2569,12 @@ fn bindgen_test_layout_AutoCheckRequestDepth() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooterBase { pub _base: AutoGCRooter, pub _phantom0: ::std::marker::PhantomData, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooter { pub _base: AutoVectorRooterBase, @@ -2614,7 +2589,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, @@ -2868,7 +2842,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, @@ -2886,7 +2859,6 @@ fn bindgen_test_layout_SourceBufferHolder() { pub type JS_CurrentEmbedderTimeFunction = ::std::option::Option f64>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoRequest { pub mContext: *mut JSContext, @@ -3059,7 +3031,6 @@ fn bindgen_test_layout_RuntimeOptions() { assert_eq!(::std::mem::align_of::() , 1usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoCompartment { pub cx_: *mut JSContext, @@ -3071,7 +3042,6 @@ fn bindgen_test_layout_JSAutoCompartment() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoNullableCompartment { pub cx_: *mut JSContext, @@ -3566,7 +3536,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, @@ -3588,7 +3557,6 @@ fn bindgen_test_layout_AutoSetAsyncStackForNewCalls() { 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoByteString { pub mBytes: *mut ::std::os::raw::c_char, @@ -3719,7 +3687,6 @@ pub type WarningReporter = * return ok; */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSaveExceptionState { pub context: *mut JSContext, @@ -3760,7 +3727,6 @@ pub enum JSJitCompilerOption { } pub enum ScriptSource { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoFilename { pub ss_: *mut ScriptSource, @@ -3813,7 +3779,6 @@ impl AutoFilename { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoHideScriptedCaller { pub mContext: *mut JSContext, @@ -3912,7 +3877,6 @@ fn bindgen_test_layout_AsmJSCacheOps() { * } */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ForOfIterator { pub cx_: *mut JSContext, @@ -4257,7 +4221,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, @@ -4547,7 +4510,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ExpandoAndGeneration { pub expando: Heap, pub generation: u64, @@ -5344,7 +5306,6 @@ pub type CTypesActivityCallback = ::std::option::Option; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCTypesActivityCallback { pub cx: *mut JSContext, @@ -5363,7 +5324,6 @@ impl ::std::clone::Clone for AllocationMetadataBuilder { fn clone(&self) -> Self { *self } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct NativeProfiler { pub _vftable: *const _vftable_NativeProfiler, @@ -5383,7 +5343,6 @@ fn bindgen_test_layout_NativeProfiler() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct GCHeapProfiler { pub _vftable: *const _vftable_GCHeapProfiler, @@ -5617,7 +5576,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, @@ -5702,7 +5660,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, @@ -5741,7 +5698,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, @@ -5757,7 +5713,6 @@ fn bindgen_test_layout_NotableScriptSourceInfo() { * compartments within it. */ #[repr(C)] -#[unsafe_no_drop_flag] pub struct RuntimeSizes { pub object: usize, pub atomsTable: usize, @@ -5802,7 +5757,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ZoneStats { pub symbolsGCHeap: usize, pub gcHeapArenaAdmin: usize, @@ -5837,7 +5791,6 @@ impl ZoneStats { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct CompartmentStats { pub objectsPrivate: usize, pub scriptsGCHeap: usize, diff --git a/src/jsapi_windows_gcc_64.rs b/src/jsapi_windows_gcc_64.rs index 3f10e3864..69ebe127c 100644 --- a/src/jsapi_windows_gcc_64.rs +++ b/src/jsapi_windows_gcc_64.rs @@ -162,7 +162,6 @@ impl TempAllocPolicy { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct LinkedListElement { pub mNext: *mut LinkedListElement, @@ -175,7 +174,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 { pub sentinel: LinkedListElement, @@ -186,7 +184,6 @@ pub struct LinkedList_Iterator { pub mCurrent: *mut T, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCleanLinkedList { pub _base: LinkedList, @@ -363,7 +360,6 @@ fn bindgen_test_layout_Runtime() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoGCRooter { pub down: *mut AutoGCRooter, @@ -412,7 +408,6 @@ pub enum StackKind { } pub type RootedListHeads = ::std::os::raw::c_void; #[repr(C)] -#[unsafe_no_drop_flag] pub struct RootLists { pub stackRoots_: [u64; 12usize], pub autoGCRooters_: *mut AutoGCRooter, @@ -450,7 +445,6 @@ impl RootLists { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ContextFriendFields { pub runtime_: *mut JSRuntime, pub compartment_: *mut JSCompartment, @@ -464,7 +458,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], @@ -516,7 +509,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, @@ -716,7 +708,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, @@ -731,7 +722,6 @@ fn bindgen_test_layout_AutoDisableGenerationalGC() { * the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertOnGC; /** @@ -786,7 +776,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() { * heap. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckCannotGC { pub _base: AutoAssertOnGC, @@ -905,7 +894,6 @@ impl CallbackTracer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingName { pub trc_: *mut CallbackTracer, @@ -917,7 +905,6 @@ fn bindgen_test_layout_AutoTracingName() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingIndex { pub trc_: *mut CallbackTracer, @@ -928,7 +915,6 @@ fn bindgen_test_layout_AutoTracingIndex() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingDetails { pub trc_: *mut CallbackTracer, @@ -1090,7 +1076,6 @@ pub struct DispatchWrapper { * specialization, define a RootedBase specialization containing them. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct Rooted { pub _base: RootedBase, @@ -1159,7 +1144,6 @@ 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 { pub _base: PersistentRootedBase, @@ -1167,7 +1151,6 @@ pub struct PersistentRooted { pub ptr: T, } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ObjectPtr { pub value: Heap<*mut JSObject>, } @@ -1905,7 +1888,6 @@ pub type UnwatchOp = obj: HandleObject, id: HandleId) -> bool>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ElementAdder { pub resObj_: RootedObject, @@ -2292,7 +2274,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, @@ -2486,7 +2467,6 @@ impl JSAutoStructuredCloneBuffer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSPrincipals { pub _vftable: *const _vftable_JSPrincipals, @@ -2536,14 +2516,12 @@ pub type JSReadPrincipalsOp = -> bool>; pub enum TwoByteChars { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooterBase { pub _base: AutoGCRooter, pub _phantom0: ::std::marker::PhantomData, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooter { pub _base: AutoVectorRooterBase, @@ -2558,7 +2536,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, @@ -2812,7 +2789,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, @@ -2830,7 +2806,6 @@ fn bindgen_test_layout_SourceBufferHolder() { pub type JS_CurrentEmbedderTimeFunction = ::std::option::Option f64>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoRequest { pub mContext: *mut JSContext, @@ -3003,7 +2978,6 @@ fn bindgen_test_layout_RuntimeOptions() { assert_eq!(::std::mem::align_of::() , 1usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoCompartment { pub cx_: *mut JSContext, @@ -3015,7 +2989,6 @@ fn bindgen_test_layout_JSAutoCompartment() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoNullableCompartment { pub cx_: *mut JSContext, @@ -3510,7 +3483,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, @@ -3532,7 +3504,6 @@ fn bindgen_test_layout_AutoSetAsyncStackForNewCalls() { 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoByteString { pub mBytes: *mut ::std::os::raw::c_char, @@ -3663,7 +3634,6 @@ pub type WarningReporter = * return ok; */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSaveExceptionState { pub context: *mut JSContext, @@ -3704,7 +3674,6 @@ pub enum JSJitCompilerOption { } pub enum ScriptSource { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoFilename { pub ss_: *mut ScriptSource, @@ -3757,7 +3726,6 @@ impl AutoFilename { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoHideScriptedCaller { pub mContext: *mut JSContext, @@ -3856,7 +3824,6 @@ fn bindgen_test_layout_AsmJSCacheOps() { * } */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ForOfIterator { pub cx_: *mut JSContext, @@ -4201,7 +4168,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, @@ -4511,7 +4477,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ExpandoAndGeneration { pub expando: Heap, pub generation: u64, @@ -5321,7 +5286,6 @@ pub type CTypesActivityCallback = ::std::option::Option; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCTypesActivityCallback { pub cx: *mut JSContext, @@ -5351,7 +5315,6 @@ fn bindgen_test_layout_AllocationMetadataBuilder() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct NativeProfiler { pub _vftable: *const _vftable_NativeProfiler, @@ -5371,7 +5334,6 @@ fn bindgen_test_layout_NativeProfiler() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct GCHeapProfiler { pub _vftable: *const _vftable_GCHeapProfiler, @@ -5605,7 +5567,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, @@ -5690,7 +5651,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, @@ -5729,7 +5689,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, @@ -5745,7 +5704,6 @@ fn bindgen_test_layout_NotableScriptSourceInfo() { * compartments within it. */ #[repr(C)] -#[unsafe_no_drop_flag] pub struct RuntimeSizes { pub object: usize, pub atomsTable: usize, @@ -5790,7 +5748,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ZoneStats { pub symbolsGCHeap: usize, pub gcHeapArenaAdmin: usize, @@ -5825,7 +5782,6 @@ impl ZoneStats { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct CompartmentStats { pub objectsPrivate: usize, pub scriptsGCHeap: usize, diff --git a/src/jsapi_windows_gcc_64_debug.rs b/src/jsapi_windows_gcc_64_debug.rs index e213e0602..fd6e43f93 100644 --- a/src/jsapi_windows_gcc_64_debug.rs +++ b/src/jsapi_windows_gcc_64_debug.rs @@ -163,7 +163,6 @@ impl TempAllocPolicy { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct LinkedListElement { pub mNext: *mut LinkedListElement, @@ -176,7 +175,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 { pub sentinel: LinkedListElement, @@ -187,7 +185,6 @@ pub struct LinkedList_Iterator { pub mCurrent: *mut T, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCleanLinkedList { pub _base: LinkedList, @@ -364,7 +361,6 @@ fn bindgen_test_layout_Runtime() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoGCRooter { pub down: *mut AutoGCRooter, @@ -413,7 +409,6 @@ pub enum StackKind { } pub type RootedListHeads = ::std::os::raw::c_void; #[repr(C)] -#[unsafe_no_drop_flag] pub struct RootLists { pub stackRoots_: [u64; 12usize], pub autoGCRooters_: *mut AutoGCRooter, @@ -451,7 +446,6 @@ impl RootLists { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ContextFriendFields { pub runtime_: *mut JSRuntime, pub compartment_: *mut JSCompartment, @@ -465,7 +459,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], @@ -518,7 +511,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, @@ -718,7 +710,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, @@ -733,7 +724,6 @@ fn bindgen_test_layout_AutoDisableGenerationalGC() { * the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertOnGC; /** @@ -741,7 +731,6 @@ pub struct AutoAssertOnGC; * class does not disable the static rooting hazard analysis. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoAssertNoAlloc { pub gc: *mut GCRuntime, @@ -778,7 +767,6 @@ impl AutoAssertNoAlloc { * on this class. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSuppressGCAnalysis { pub _base: AutoAssertNoAlloc, @@ -808,7 +796,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() { * heap. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckCannotGC { pub _base: AutoAssertOnGC, @@ -927,7 +914,6 @@ impl CallbackTracer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingName { pub trc_: *mut CallbackTracer, @@ -939,7 +925,6 @@ fn bindgen_test_layout_AutoTracingName() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingIndex { pub trc_: *mut CallbackTracer, @@ -950,7 +935,6 @@ fn bindgen_test_layout_AutoTracingIndex() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoTracingDetails { pub trc_: *mut CallbackTracer, @@ -1112,7 +1096,6 @@ pub struct DispatchWrapper { * specialization, define a RootedBase specialization containing them. */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct Rooted { pub _base: RootedBase, @@ -1181,7 +1164,6 @@ 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 { pub _base: PersistentRootedBase, @@ -1189,7 +1171,6 @@ pub struct PersistentRooted { pub ptr: T, } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ObjectPtr { pub value: Heap<*mut JSObject>, } @@ -1962,7 +1943,6 @@ pub type UnwatchOp = obj: HandleObject, id: HandleId) -> bool>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ElementAdder { pub resObj_: RootedObject, @@ -2349,7 +2329,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, @@ -2543,7 +2522,6 @@ impl JSAutoStructuredCloneBuffer { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSPrincipals { pub _vftable: *const _vftable_JSPrincipals, @@ -2594,7 +2572,6 @@ pub type JSReadPrincipalsOp = -> bool>; pub enum TwoByteChars { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCheckRequestDepth { pub cx: *mut JSContext, @@ -2605,14 +2582,12 @@ fn bindgen_test_layout_AutoCheckRequestDepth() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooterBase { pub _base: AutoGCRooter, pub _phantom0: ::std::marker::PhantomData, } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoVectorRooter { pub _base: AutoVectorRooterBase, @@ -2627,7 +2602,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, @@ -2881,7 +2855,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, @@ -2899,7 +2872,6 @@ fn bindgen_test_layout_SourceBufferHolder() { pub type JS_CurrentEmbedderTimeFunction = ::std::option::Option f64>; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoRequest { pub mContext: *mut JSContext, @@ -3072,7 +3044,6 @@ fn bindgen_test_layout_RuntimeOptions() { assert_eq!(::std::mem::align_of::() , 1usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoCompartment { pub cx_: *mut JSContext, @@ -3084,7 +3055,6 @@ fn bindgen_test_layout_JSAutoCompartment() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoNullableCompartment { pub cx_: *mut JSContext, @@ -3579,7 +3549,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, @@ -3601,7 +3570,6 @@ fn bindgen_test_layout_AutoSetAsyncStackForNewCalls() { 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct JSAutoByteString { pub mBytes: *mut ::std::os::raw::c_char, @@ -3732,7 +3700,6 @@ pub type WarningReporter = * return ok; */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoSaveExceptionState { pub context: *mut JSContext, @@ -3773,7 +3740,6 @@ pub enum JSJitCompilerOption { } pub enum ScriptSource { } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoFilename { pub ss_: *mut ScriptSource, @@ -3826,7 +3792,6 @@ impl AutoFilename { } } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoHideScriptedCaller { pub mContext: *mut JSContext, @@ -3925,7 +3890,6 @@ fn bindgen_test_layout_AsmJSCacheOps() { * } */ #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct ForOfIterator { pub cx_: *mut JSContext, @@ -4270,7 +4234,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, @@ -4580,7 +4543,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ExpandoAndGeneration { pub expando: Heap, pub generation: u64, @@ -5390,7 +5352,6 @@ pub type CTypesActivityCallback = ::std::option::Option; #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct AutoCTypesActivityCallback { pub cx: *mut JSContext, @@ -5420,7 +5381,6 @@ fn bindgen_test_layout_AllocationMetadataBuilder() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct NativeProfiler { pub _vftable: *const _vftable_NativeProfiler, @@ -5440,7 +5400,6 @@ fn bindgen_test_layout_NativeProfiler() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] #[derive(Debug)] pub struct GCHeapProfiler { pub _vftable: *const _vftable_GCHeapProfiler, @@ -5674,7 +5633,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, @@ -5759,7 +5717,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, @@ -5798,7 +5755,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, @@ -5814,7 +5770,6 @@ fn bindgen_test_layout_NotableScriptSourceInfo() { * compartments within it. */ #[repr(C)] -#[unsafe_no_drop_flag] pub struct RuntimeSizes { pub object: usize, pub atomsTable: usize, @@ -5859,7 +5814,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -#[unsafe_no_drop_flag] pub struct ZoneStats { pub symbolsGCHeap: usize, pub gcHeapArenaAdmin: usize, @@ -5894,7 +5848,6 @@ impl ZoneStats { } } #[repr(C)] -#[unsafe_no_drop_flag] pub struct CompartmentStats { pub objectsPrivate: usize, pub scriptsGCHeap: usize, diff --git a/src/lib.rs b/src/lib.rs index 0c43a0a52..5bc9edb3a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,6 @@ #![feature(filling_drop)] #![feature(link_args)] -#![feature(unsafe_no_drop_flag)] #![feature(const_fn)] #![allow(drop_with_repr_extern)] @@ -27,7 +26,6 @@ pub mod jsapi { use libc::FILE; #[repr(C)] - #[unsafe_no_drop_flag] #[derive(Debug)] pub struct Heap + Copy> { pub ptr: ::std::cell::UnsafeCell, diff --git a/src/rust.rs b/src/rust.rs index 686e85e7b..d7c32342c 100644 --- a/src/rust.rs +++ b/src/rust.rs @@ -476,19 +476,16 @@ const ChunkLocationOffset: usize = ChunkSize - 2 * 4 - 8; pub trait GCMethods { unsafe fn initial() -> T; - unsafe fn is_dropped(self) -> bool; unsafe fn post_barrier(v: *mut T, prev: T, next: T); } impl GCMethods for jsid { unsafe fn initial() -> jsid { JSID_VOID } - unsafe fn is_dropped(self) -> bool { self.asBits == mem::POST_DROP_USIZE } unsafe fn post_barrier(_: *mut jsid, _: jsid, _: jsid) {} } impl GCMethods<*mut JSObject> for *mut JSObject { unsafe fn initial() -> *mut JSObject { ptr::null_mut() } - unsafe fn is_dropped(self) -> bool { self as usize == mem::POST_DROP_USIZE } unsafe fn post_barrier(v: *mut *mut JSObject, prev: *mut JSObject, next: *mut JSObject) { HeapObjectPostBarrier(v, prev, next); @@ -497,19 +494,16 @@ impl GCMethods<*mut JSObject> for *mut JSObject { impl GCMethods<*mut JSString> for *mut JSString { unsafe fn initial() -> *mut JSString { ptr::null_mut() } - unsafe fn is_dropped(self) -> bool { self as usize == mem::POST_DROP_USIZE } unsafe fn post_barrier(_: *mut *mut JSString, _: *mut JSString, _: *mut JSString) {} } impl GCMethods<*mut JSScript> for *mut JSScript { unsafe fn initial() -> *mut JSScript { ptr::null_mut() } - unsafe fn is_dropped(self) -> bool { self as usize == mem::POST_DROP_USIZE } unsafe fn post_barrier(_: *mut *mut JSScript, _: *mut JSScript, _: *mut JSScript) { } } impl GCMethods<*mut JSFunction> for *mut JSFunction { unsafe fn initial() -> *mut JSFunction { ptr::null_mut() } - unsafe fn is_dropped(self) -> bool { self as usize == mem::POST_DROP_USIZE } unsafe fn post_barrier(v: *mut *mut JSFunction, prev: *mut JSFunction, next: *mut JSFunction) { HeapObjectPostBarrier(mem::transmute(v), @@ -519,7 +513,6 @@ impl GCMethods<*mut JSFunction> for *mut JSFunction { impl GCMethods for Value { unsafe fn initial() -> Value { UndefinedValue() } - unsafe fn is_dropped(self) -> bool { self.data._bindgen_data_ == mem::POST_DROP_U64 } unsafe fn post_barrier(v: *mut Value, prev: Value, next: Value) { HeapValuePostBarrier(v, &prev, &next); } @@ -570,9 +563,7 @@ impl + Copy> Drop for Heap { fn drop(&mut self) { unsafe { let ptr = self.ptr.get(); - if !(*ptr).is_dropped() { - T::post_barrier(ptr, *ptr, T::initial()); - } + T::post_barrier(ptr, *ptr, T::initial()); } } }