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

Commit

Permalink
Auto merge of #298 - servo:no-no-drop-flag, r=metajack
Browse files Browse the repository at this point in the history
Remove unsafe_no_drop_flag

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/298)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo authored Aug 28, 2016
2 parents 9a200ea + 049537f commit f06428f
Show file tree
Hide file tree
Showing 15 changed files with 3 additions and 473 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: rust
sudo: 9000
dist: trusty
rust:
- nightly-2016-08-23
- nightly
os:
- linux
- osx
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion etc/bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
44 changes: 0 additions & 44 deletions src/jsapi_linux_32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ impl TempAllocPolicy {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct LinkedListElement<T> {
pub mNext: *mut LinkedListElement<T>,
Expand All @@ -174,7 +173,6 @@ pub const NODE_KIND_SENTINEL: LinkedListElement_NodeKind =
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum LinkedListElement_NodeKind { NODE_KIND_NORMAL = 0, }
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct LinkedList<T> {
pub sentinel: LinkedListElement<T>,
Expand All @@ -185,7 +183,6 @@ pub struct LinkedList_Iterator<T> {
pub mCurrent: *mut T,
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoCleanLinkedList<T> {
pub _base: LinkedList<T>,
Expand Down Expand Up @@ -362,7 +359,6 @@ fn bindgen_test_layout_Runtime() {
assert_eq!(::std::mem::align_of::<Runtime>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoGCRooter {
pub down: *mut AutoGCRooter,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -449,7 +444,6 @@ impl RootLists {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct ContextFriendFields {
pub runtime_: *mut JSRuntime,
pub compartment_: *mut JSCompartment,
Expand All @@ -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],
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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;
/**
Expand Down Expand Up @@ -785,7 +775,6 @@ fn bindgen_test_layout_AutoAssertGCCallback() {
* heap.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoCheckCannotGC {
pub _base: AutoAssertOnGC,
Expand Down Expand Up @@ -904,7 +893,6 @@ impl CallbackTracer {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoTracingName {
pub trc_: *mut CallbackTracer,
Expand All @@ -916,7 +904,6 @@ fn bindgen_test_layout_AutoTracingName() {
assert_eq!(::std::mem::align_of::<AutoTracingName>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoTracingIndex {
pub trc_: *mut CallbackTracer,
Expand All @@ -927,7 +914,6 @@ fn bindgen_test_layout_AutoTracingIndex() {
assert_eq!(::std::mem::align_of::<AutoTracingIndex>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoTracingDetails {
pub trc_: *mut CallbackTracer,
Expand Down Expand Up @@ -1089,7 +1075,6 @@ pub struct DispatchWrapper<T> {
* specialization, define a RootedBase<T> specialization containing them.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct Rooted<T> {
pub _base: RootedBase<T>,
Expand Down Expand Up @@ -1158,15 +1143,13 @@ pub enum AllowGC { NoGC = 0, CanGC = 1, }
* marked when the object itself is marked.
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct PersistentRooted<T> {
pub _base: PersistentRootedBase<T>,
pub _base1: LinkedListElement<T>,
pub ptr: T,
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct ObjectPtr {
pub value: Heap<*mut JSObject>,
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -2512,7 +2493,6 @@ impl JSAutoStructuredCloneBuffer {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSPrincipals {
pub _vftable: *const _vftable_JSPrincipals,
Expand Down Expand Up @@ -2562,14 +2542,12 @@ pub type JSReadPrincipalsOp =
-> bool>;
pub enum TwoByteChars { }
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoVectorRooterBase<T> {
pub _base: AutoGCRooter,
pub _phantom0: ::std::marker::PhantomData<T>,
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoVectorRooter<T> {
pub _base: AutoVectorRooterBase<T>,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -2856,7 +2832,6 @@ fn bindgen_test_layout_SourceBufferHolder() {
pub type JS_CurrentEmbedderTimeFunction =
::std::option::Option<unsafe extern "C" fn() -> f64>;
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSAutoRequest {
pub mContext: *mut JSContext,
Expand Down Expand Up @@ -3029,7 +3004,6 @@ fn bindgen_test_layout_RuntimeOptions() {
assert_eq!(::std::mem::align_of::<RuntimeOptions>() , 1usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSAutoCompartment {
pub cx_: *mut JSContext,
Expand All @@ -3041,7 +3015,6 @@ fn bindgen_test_layout_JSAutoCompartment() {
assert_eq!(::std::mem::align_of::<JSAutoCompartment>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct JSAutoNullableCompartment {
pub cx_: *mut JSContext,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -3689,7 +3660,6 @@ pub type WarningReporter =
* return ok;
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoSaveExceptionState {
pub context: *mut JSContext,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -3783,7 +3752,6 @@ impl AutoFilename {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoHideScriptedCaller {
pub mContext: *mut JSContext,
Expand Down Expand Up @@ -3882,7 +3850,6 @@ fn bindgen_test_layout_AsmJSCacheOps() {
* }
*/
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct ForOfIterator {
pub cx_: *mut JSContext,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -4537,7 +4503,6 @@ fn bindgen_test_layout_CompartmentsWithPrincipals() {
assert_eq!(::std::mem::align_of::<CompartmentsWithPrincipals>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct ExpandoAndGeneration {
pub expando: Heap<Value>,
pub generation: u64,
Expand Down Expand Up @@ -5347,7 +5312,6 @@ pub type CTypesActivityCallback =
::std::option::Option<unsafe extern "C" fn(cx: *mut JSContext,
type_: CTypesActivityType)>;
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct AutoCTypesActivityCallback {
pub cx: *mut JSContext,
Expand Down Expand Up @@ -5377,7 +5341,6 @@ fn bindgen_test_layout_AllocationMetadataBuilder() {
assert_eq!(::std::mem::align_of::<AllocationMetadataBuilder>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct NativeProfiler {
pub _vftable: *const _vftable_NativeProfiler,
Expand All @@ -5397,7 +5360,6 @@ fn bindgen_test_layout_NativeProfiler() {
assert_eq!(::std::mem::align_of::<NativeProfiler>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
#[derive(Debug)]
pub struct GCHeapProfiler {
pub _vftable: *const _vftable_GCHeapProfiler,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -5816,7 +5774,6 @@ fn bindgen_test_layout_UnusedGCThingSizes() {
assert_eq!(::std::mem::align_of::<UnusedGCThingSizes>() , 4usize);
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct ZoneStats {
pub symbolsGCHeap: usize,
pub gcHeapArenaAdmin: usize,
Expand Down Expand Up @@ -5851,7 +5808,6 @@ impl ZoneStats {
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
pub struct CompartmentStats {
pub objectsPrivate: usize,
pub scriptsGCHeap: usize,
Expand Down
Loading

0 comments on commit f06428f

Please sign in to comment.