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

Commit 3ae440a

Browse files
committed
Remove unsafe_no_drop_flag
1 parent 9a200ea commit 3ae440a

13 files changed

+3
-379
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: rust
22
sudo: 9000
33
dist: trusty
44
rust:
5-
- nightly-2016-08-23
5+
- nightly
66
os:
77
- linux
88
- osx

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ environment:
3939
install:
4040
- ps: Start-FileDownload "http://servo-rust.s3.amazonaws.com/build/MozillaBuildSetup-2.2.0.exe"
4141
- ps: .\MozillaBuildSetup-2.2.0.exe /S | Out-Null
42-
- ps: Start-FileDownload "https://static.rust-lang.org/dist/2016-08-23/rust-${env:TARGET}.exe" -FileName "rust-install.exe"
42+
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:TARGET}.exe" -FileName "rust-install.exe"
4343
- ps: .\rust-install.exe /VERYSILENT /NORESTART /DIR="C:\rust" | Out-Null
4444
- ps: $env:PATH="$env:PATH;C:\rust\bin"
4545
# I can't make this work with a multi-line script (e.g. via |+ etc.), so we copy the if before every command

etc/bindings.sh

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ $BINDGEN \
2222
${EXTRA_FLAGS} \
2323
-no-class-constants \
2424
-no-type-renaming \
25-
-dtor-attr unsafe_no_drop_flag \
2625
-blacklist-type DefaultHasher \
2726
-blacklist-type Heap \
2827
-blacklist-type AutoHashMapRooter \

src/jsapi_linux_32.rs

-44
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ impl TempAllocPolicy {
161161
}
162162
}
163163
#[repr(C)]
164-
#[unsafe_no_drop_flag]
165164
#[derive(Debug)]
166165
pub struct LinkedListElement<T> {
167166
pub mNext: *mut LinkedListElement<T>,
@@ -174,7 +173,6 @@ pub const NODE_KIND_SENTINEL: LinkedListElement_NodeKind =
174173
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
175174
pub enum LinkedListElement_NodeKind { NODE_KIND_NORMAL = 0, }
176175
#[repr(C)]
177-
#[unsafe_no_drop_flag]
178176
#[derive(Debug)]
179177
pub struct LinkedList<T> {
180178
pub sentinel: LinkedListElement<T>,
@@ -185,7 +183,6 @@ pub struct LinkedList_Iterator<T> {
185183
pub mCurrent: *mut T,
186184
}
187185
#[repr(C)]
188-
#[unsafe_no_drop_flag]
189186
#[derive(Debug)]
190187
pub struct AutoCleanLinkedList<T> {
191188
pub _base: LinkedList<T>,
@@ -362,7 +359,6 @@ fn bindgen_test_layout_Runtime() {
362359
assert_eq!(::std::mem::align_of::<Runtime>() , 4usize);
363360
}
364361
#[repr(C)]
365-
#[unsafe_no_drop_flag]
366362
#[derive(Debug)]
367363
pub struct AutoGCRooter {
368364
pub down: *mut AutoGCRooter,
@@ -411,7 +407,6 @@ pub enum StackKind {
411407
}
412408
pub type RootedListHeads = ::std::os::raw::c_void;
413409
#[repr(C)]
414-
#[unsafe_no_drop_flag]
415410
pub struct RootLists {
416411
pub stackRoots_: [u32; 12usize],
417412
pub autoGCRooters_: *mut AutoGCRooter,
@@ -449,7 +444,6 @@ impl RootLists {
449444
}
450445
}
451446
#[repr(C)]
452-
#[unsafe_no_drop_flag]
453447
pub struct ContextFriendFields {
454448
pub runtime_: *mut JSRuntime,
455449
pub compartment_: *mut JSCompartment,
@@ -463,7 +457,6 @@ fn bindgen_test_layout_ContextFriendFields() {
463457
}
464458
pub enum PerThreadData { }
465459
#[repr(C)]
466-
#[unsafe_no_drop_flag]
467460
pub struct PerThreadDataFriendFields {
468461
pub roots: RootLists,
469462
pub nativeStackLimit: [usize; 3usize],
@@ -515,7 +508,6 @@ impl ::std::clone::Clone for MallocAllocPolicy {
515508
pub enum VectorTesting { }
516509
pub enum Cell { }
517510
#[repr(C)]
518-
#[unsafe_no_drop_flag]
519511
pub struct Zone {
520512
pub runtime_: *mut JSRuntime,
521513
pub barrierTracer_: *mut JSTracer,
@@ -715,7 +707,6 @@ pub type GCNurseryCollectionCallback =
715707
reason: Reason)>;
716708
/** Ensure that generational GC is disabled within some scope. */
717709
#[repr(C)]
718-
#[unsafe_no_drop_flag]
719710
#[derive(Debug)]
720711
pub struct AutoDisableGenerationalGC {
721712
pub gc: *mut GCRuntime,
@@ -730,7 +721,6 @@ fn bindgen_test_layout_AutoDisableGenerationalGC() {
730721
* the static rooting hazard analysis.
731722
*/
732723
#[repr(C)]
733-
#[unsafe_no_drop_flag]
734724
#[derive(Debug)]
735725
pub struct AutoAssertOnGC;
736726
/**
@@ -785,7 +775,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() {
785775
* heap.
786776
*/
787777
#[repr(C)]
788-
#[unsafe_no_drop_flag]
789778
#[derive(Debug)]
790779
pub struct AutoCheckCannotGC {
791780
pub _base: AutoAssertOnGC,
@@ -904,7 +893,6 @@ impl CallbackTracer {
904893
}
905894
}
906895
#[repr(C)]
907-
#[unsafe_no_drop_flag]
908896
#[derive(Debug)]
909897
pub struct AutoTracingName {
910898
pub trc_: *mut CallbackTracer,
@@ -916,7 +904,6 @@ fn bindgen_test_layout_AutoTracingName() {
916904
assert_eq!(::std::mem::align_of::<AutoTracingName>() , 4usize);
917905
}
918906
#[repr(C)]
919-
#[unsafe_no_drop_flag]
920907
#[derive(Debug)]
921908
pub struct AutoTracingIndex {
922909
pub trc_: *mut CallbackTracer,
@@ -927,7 +914,6 @@ fn bindgen_test_layout_AutoTracingIndex() {
927914
assert_eq!(::std::mem::align_of::<AutoTracingIndex>() , 4usize);
928915
}
929916
#[repr(C)]
930-
#[unsafe_no_drop_flag]
931917
#[derive(Debug)]
932918
pub struct AutoTracingDetails {
933919
pub trc_: *mut CallbackTracer,
@@ -1089,7 +1075,6 @@ pub struct DispatchWrapper<T> {
10891075
* specialization, define a RootedBase<T> specialization containing them.
10901076
*/
10911077
#[repr(C)]
1092-
#[unsafe_no_drop_flag]
10931078
#[derive(Debug)]
10941079
pub struct Rooted<T> {
10951080
pub _base: RootedBase<T>,
@@ -1158,15 +1143,13 @@ pub enum AllowGC { NoGC = 0, CanGC = 1, }
11581143
* marked when the object itself is marked.
11591144
*/
11601145
#[repr(C)]
1161-
#[unsafe_no_drop_flag]
11621146
#[derive(Debug)]
11631147
pub struct PersistentRooted<T> {
11641148
pub _base: PersistentRootedBase<T>,
11651149
pub _base1: LinkedListElement<T>,
11661150
pub ptr: T,
11671151
}
11681152
#[repr(C)]
1169-
#[unsafe_no_drop_flag]
11701153
pub struct ObjectPtr {
11711154
pub value: Heap<*mut JSObject>,
11721155
}
@@ -1931,7 +1914,6 @@ pub type UnwatchOp =
19311914
obj: HandleObject,
19321915
id: HandleId) -> bool>;
19331916
#[repr(C)]
1934-
#[unsafe_no_drop_flag]
19351917
#[derive(Debug)]
19361918
pub struct ElementAdder {
19371919
pub resObj_: RootedObject,
@@ -2318,7 +2300,6 @@ fn bindgen_test_layout_JSStructuredCloneCallbacks() {
23182300
}
23192301
/** RAII sugar for JS_WriteStructuredClone. */
23202302
#[repr(C)]
2321-
#[unsafe_no_drop_flag]
23222303
#[derive(Debug)]
23232304
pub struct JSAutoStructuredCloneBuffer {
23242305
pub data_: *mut u64,
@@ -2512,7 +2493,6 @@ impl JSAutoStructuredCloneBuffer {
25122493
}
25132494
}
25142495
#[repr(C)]
2515-
#[unsafe_no_drop_flag]
25162496
#[derive(Debug)]
25172497
pub struct JSPrincipals {
25182498
pub _vftable: *const _vftable_JSPrincipals,
@@ -2562,14 +2542,12 @@ pub type JSReadPrincipalsOp =
25622542
-> bool>;
25632543
pub enum TwoByteChars { }
25642544
#[repr(C)]
2565-
#[unsafe_no_drop_flag]
25662545
#[derive(Debug)]
25672546
pub struct AutoVectorRooterBase<T> {
25682547
pub _base: AutoGCRooter,
25692548
pub _phantom0: ::std::marker::PhantomData<T>,
25702549
}
25712550
#[repr(C)]
2572-
#[unsafe_no_drop_flag]
25732551
#[derive(Debug)]
25742552
pub struct AutoVectorRooter<T> {
25752553
pub _base: AutoVectorRooterBase<T>,
@@ -2584,7 +2562,6 @@ pub type StringVector = ::std::os::raw::c_void;
25842562
* Custom rooting behavior for internal and external clients.
25852563
*/
25862564
#[repr(C)]
2587-
#[unsafe_no_drop_flag]
25882565
#[derive(Debug)]
25892566
pub struct CustomAutoRooter {
25902567
pub _vftable: *const _vftable_CustomAutoRooter,
@@ -2838,7 +2815,6 @@ pub type JSCompartmentNameCallback =
28382815
* JS::Compile(cx, options, srcBuf);
28392816
*/
28402817
#[repr(C)]
2841-
#[unsafe_no_drop_flag]
28422818
#[derive(Debug)]
28432819
pub struct SourceBufferHolder {
28442820
pub data_: *const ::std::os::raw::c_ushort,
@@ -2856,7 +2832,6 @@ fn bindgen_test_layout_SourceBufferHolder() {
28562832
pub type JS_CurrentEmbedderTimeFunction =
28572833
::std::option::Option<unsafe extern "C" fn() -> f64>;
28582834
#[repr(C)]
2859-
#[unsafe_no_drop_flag]
28602835
#[derive(Debug)]
28612836
pub struct JSAutoRequest {
28622837
pub mContext: *mut JSContext,
@@ -3029,7 +3004,6 @@ fn bindgen_test_layout_RuntimeOptions() {
30293004
assert_eq!(::std::mem::align_of::<RuntimeOptions>() , 1usize);
30303005
}
30313006
#[repr(C)]
3032-
#[unsafe_no_drop_flag]
30333007
#[derive(Debug)]
30343008
pub struct JSAutoCompartment {
30353009
pub cx_: *mut JSContext,
@@ -3041,7 +3015,6 @@ fn bindgen_test_layout_JSAutoCompartment() {
30413015
assert_eq!(::std::mem::align_of::<JSAutoCompartment>() , 4usize);
30423016
}
30433017
#[repr(C)]
3044-
#[unsafe_no_drop_flag]
30453018
#[derive(Debug)]
30463019
pub struct JSAutoNullableCompartment {
30473020
pub cx_: *mut JSContext,
@@ -3536,7 +3509,6 @@ pub enum PromiseState { Pending = 0, Fulfilled = 1, Rejected = 2, }
35363509
* stack frames.
35373510
*/
35383511
#[repr(C)]
3539-
#[unsafe_no_drop_flag]
35403512
#[derive(Debug)]
35413513
pub struct AutoSetAsyncStackForNewCalls {
35423514
pub cx: *mut JSContext,
@@ -3558,7 +3530,6 @@ fn bindgen_test_layout_AutoSetAsyncStackForNewCalls() {
35583530
4usize);
35593531
}
35603532
#[repr(C)]
3561-
#[unsafe_no_drop_flag]
35623533
#[derive(Debug)]
35633534
pub struct JSAutoByteString {
35643535
pub mBytes: *mut ::std::os::raw::c_char,
@@ -3689,7 +3660,6 @@ pub type WarningReporter =
36893660
* return ok;
36903661
*/
36913662
#[repr(C)]
3692-
#[unsafe_no_drop_flag]
36933663
#[derive(Debug)]
36943664
pub struct AutoSaveExceptionState {
36953665
pub context: *mut JSContext,
@@ -3730,7 +3700,6 @@ pub enum JSJitCompilerOption {
37303700
}
37313701
pub enum ScriptSource { }
37323702
#[repr(C)]
3733-
#[unsafe_no_drop_flag]
37343703
#[derive(Debug)]
37353704
pub struct AutoFilename {
37363705
pub ss_: *mut ScriptSource,
@@ -3783,7 +3752,6 @@ impl AutoFilename {
37833752
}
37843753
}
37853754
#[repr(C)]
3786-
#[unsafe_no_drop_flag]
37873755
#[derive(Debug)]
37883756
pub struct AutoHideScriptedCaller {
37893757
pub mContext: *mut JSContext,
@@ -3882,7 +3850,6 @@ fn bindgen_test_layout_AsmJSCacheOps() {
38823850
* }
38833851
*/
38843852
#[repr(C)]
3885-
#[unsafe_no_drop_flag]
38863853
#[derive(Debug)]
38873854
pub struct ForOfIterator {
38883855
pub cx_: *mut JSContext,
@@ -4227,7 +4194,6 @@ fn bindgen_test_layout_JSFunctionSpecWithHelp() {
42274194
* find the source.
42284195
*/
42294196
#[repr(C)]
4230-
#[unsafe_no_drop_flag]
42314197
#[derive(Debug)]
42324198
pub struct SourceHook {
42334199
pub _vftable: *const _vftable_SourceHook,
@@ -4537,7 +4503,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() {
45374503
assert_eq!(::std::mem::align_of::<CompartmentsWithPrincipals>() , 4usize);
45384504
}
45394505
#[repr(C)]
4540-
#[unsafe_no_drop_flag]
45414506
pub struct ExpandoAndGeneration {
45424507
pub expando: Heap<Value>,
45434508
pub generation: u64,
@@ -5347,7 +5312,6 @@ pub type CTypesActivityCallback =
53475312
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
53485313
type_: CTypesActivityType)>;
53495314
#[repr(C)]
5350-
#[unsafe_no_drop_flag]
53515315
#[derive(Debug)]
53525316
pub struct AutoCTypesActivityCallback {
53535317
pub cx: *mut JSContext,
@@ -5377,7 +5341,6 @@ fn bindgen_test_layout_AllocationMetadataBuilder() {
53775341
assert_eq!(::std::mem::align_of::<AllocationMetadataBuilder>() , 4usize);
53785342
}
53795343
#[repr(C)]
5380-
#[unsafe_no_drop_flag]
53815344
#[derive(Debug)]
53825345
pub struct NativeProfiler {
53835346
pub _vftable: *const _vftable_NativeProfiler,
@@ -5397,7 +5360,6 @@ fn bindgen_test_layout_NativeProfiler() {
53975360
assert_eq!(::std::mem::align_of::<NativeProfiler>() , 4usize);
53985361
}
53995362
#[repr(C)]
5400-
#[unsafe_no_drop_flag]
54015363
#[derive(Debug)]
54025364
pub struct GCHeapProfiler {
54035365
pub _vftable: *const _vftable_GCHeapProfiler,
@@ -5631,7 +5593,6 @@ fn bindgen_test_layout_ClassInfo() {
56315593
* holds a copy of the filename.
56325594
*/
56335595
#[repr(C)]
5634-
#[unsafe_no_drop_flag]
56355596
#[derive(Debug)]
56365597
pub struct NotableClassInfo {
56375598
pub _base: ClassInfo,
@@ -5716,7 +5677,6 @@ fn bindgen_test_layout_StringInfo() {
57165677
* NotableStringInfo holds a copy of some or all of the string's chars.
57175678
*/
57185679
#[repr(C)]
5719-
#[unsafe_no_drop_flag]
57205680
#[derive(Debug)]
57215681
pub struct NotableStringInfo {
57225682
pub _base: StringInfo,
@@ -5755,7 +5715,6 @@ fn bindgen_test_layout_ScriptSourceInfo() {
57555715
* class holds a copy of the filename.
57565716
*/
57575717
#[repr(C)]
5758-
#[unsafe_no_drop_flag]
57595718
#[derive(Debug)]
57605719
pub struct NotableScriptSourceInfo {
57615720
pub _base: ScriptSourceInfo,
@@ -5771,7 +5730,6 @@ fn bindgen_test_layout_NotableScriptSourceInfo() {
57715730
* compartments within it.
57725731
*/
57735732
#[repr(C)]
5774-
#[unsafe_no_drop_flag]
57755733
pub struct RuntimeSizes {
57765734
pub object: usize,
57775735
pub atomsTable: usize,
@@ -5816,7 +5774,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() {
58165774
assert_eq!(::std::mem::align_of::<UnusedGCThingSizes>() , 4usize);
58175775
}
58185776
#[repr(C)]
5819-
#[unsafe_no_drop_flag]
58205777
pub struct ZoneStats {
58215778
pub symbolsGCHeap: usize,
58225779
pub gcHeapArenaAdmin: usize,
@@ -5851,7 +5808,6 @@ impl ZoneStats {
58515808
}
58525809
}
58535810
#[repr(C)]
5854-
#[unsafe_no_drop_flag]
58555811
pub struct CompartmentStats {
58565812
pub objectsPrivate: usize,
58575813
pub scriptsGCHeap: usize,

0 commit comments

Comments
 (0)