Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fn build_v8(is_asan: bool) {
));
// Fix GN's host_cpu detection when using x86_64 bins on Apple Silicon
if cfg!(target_os = "macos") && cfg!(target_arch = "aarch64") {
gn_args.push("host_cpu=\"arm64\"".to_string())
gn_args.push("host_cpu=\"arm64\"".to_string());
}

if env::var_os("DISABLE_CLANG").is_some() {
Expand Down
2 changes: 1 addition & 1 deletion src/V8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ pub fn initialize_platform(platform: SharedRef<Platform>) {

{
unsafe {
v8__V8__InitializePlatform(&*platform as *const Platform as *mut _)
v8__V8__InitializePlatform(&*platform as *const Platform as *mut _);
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl BigInt {
sign_bit.as_mut_ptr(),
&mut word_count,
words.as_mut_ptr(),
)
);
}

let sign_bit = unsafe { sign_bit.assume_init() };
Expand Down
6 changes: 3 additions & 3 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl Context {
self,
Self::ANNEX_SLOT,
annex_ptr as *mut _,
)
);
};
assert!(
unsafe { v8__Context__GetNumberOfEmbedderDataFields(self) } as int
Expand Down Expand Up @@ -311,7 +311,7 @@ impl Context {
self,
Self::ANNEX_SLOT,
null_mut(),
)
);
};
}
}
Expand All @@ -329,7 +329,7 @@ impl Context {
self,
slot + Self::INTERNAL_SLOT_COUNT,
data,
)
);
}

#[inline(always)]
Expand Down
4 changes: 2 additions & 2 deletions src/cppgc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub fn initialize_process(platform: SharedRef<Platform>) {
#[deprecated(note = "use correctly spelled initialize_process")]
#[inline]
pub fn initalize_process(platform: SharedRef<Platform>) {
initialize_process(platform)
initialize_process(platform);
}

/// # Safety
Expand Down Expand Up @@ -203,7 +203,7 @@ impl<T> Traced for TracedReference<T> {
cppgc__Visitor__Trace__TracedReference(
visitor,
self as *const TracedReference<T> as *const TracedReference<Data>,
)
);
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl<T> Drop for Global<T> {
// been disposed.
} else {
// Destroy the storage cell that contains the contents of this Global.
v8__Global__Reset(self.data.cast().as_ptr())
v8__Global__Reset(self.data.cast().as_ptr());
}
}
}
Expand Down Expand Up @@ -436,7 +436,7 @@ impl<T> Eq for Global<T> where T: Eq {}

impl<'s, T: Hash> Hash for Local<'s, T> {
fn hash<H: Hasher>(&self, state: &mut H) {
(**self).hash(state)
(**self).hash(state);
}
}

Expand Down Expand Up @@ -562,7 +562,7 @@ impl HandleHost {
assert!(
self.match_host(other, scope_opt),
"attempt to use Handle in an Isolate that is not its host"
)
);
}

#[allow(dead_code)]
Expand All @@ -571,7 +571,7 @@ impl HandleHost {
}

fn assert_match_isolate(self, isolate: &mut Isolate) {
self.assert_match_host(isolate.into(), Some(isolate))
self.assert_match_host(isolate.into(), Some(isolate));
}

fn get_isolate(self) -> NonNull<Isolate> {
Expand Down Expand Up @@ -873,7 +873,7 @@ impl<T> Weak<T> {
v8__WeakCallbackInfo__SetSecondPassCallback(
wci,
Self::second_pass_callback,
)
);
};
}
}
Expand Down
36 changes: 18 additions & 18 deletions src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,22 +142,22 @@ unsafe extern "C" fn v8_inspector__V8Inspector__Channel__BASE__sendResponse(
call_id: int,
message: UniquePtr<StringBuffer>,
) {
ChannelBase::dispatch_mut(this).send_response(call_id, message)
ChannelBase::dispatch_mut(this).send_response(call_id, message);
}

#[no_mangle]
unsafe extern "C" fn v8_inspector__V8Inspector__Channel__BASE__sendNotification(
this: &mut Channel,
message: UniquePtr<StringBuffer>,
) {
ChannelBase::dispatch_mut(this).send_notification(message)
ChannelBase::dispatch_mut(this).send_notification(message);
}

#[no_mangle]
unsafe extern "C" fn v8_inspector__V8Inspector__Channel__BASE__flushProtocolNotifications(
this: &mut Channel,
) {
ChannelBase::dispatch_mut(this).flush_protocol_notifications()
ChannelBase::dispatch_mut(this).flush_protocol_notifications();
}

#[no_mangle]
Expand All @@ -173,14 +173,14 @@ unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__runMessageLoopOnPaus
context_group_id: int,
) {
V8InspectorClientBase::dispatch_mut(this)
.run_message_loop_on_pause(context_group_id)
.run_message_loop_on_pause(context_group_id);
}

#[no_mangle]
unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__quitMessageLoopOnPause(
this: &mut V8InspectorClient,
) {
V8InspectorClientBase::dispatch_mut(this).quit_message_loop_on_pause()
V8InspectorClientBase::dispatch_mut(this).quit_message_loop_on_pause();
}

#[no_mangle]
Expand All @@ -189,7 +189,7 @@ unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__runIfWaitingForDebug
context_group_id: int,
) {
V8InspectorClientBase::dispatch_mut(this)
.run_if_waiting_for_debugger(context_group_id)
.run_if_waiting_for_debugger(context_group_id);
}

#[no_mangle]
Expand All @@ -211,7 +211,7 @@ unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__consoleAPIMessage(
line_number,
column_number,
stack_trace,
)
);
}

#[no_mangle]
Expand Down Expand Up @@ -240,17 +240,17 @@ impl Channel {
message: UniquePtr<StringBuffer>,
) {
unsafe {
v8_inspector__V8Inspector__Channel__sendResponse(self, call_id, message)
v8_inspector__V8Inspector__Channel__sendResponse(self, call_id, message);
}
}
pub fn send_notification(&mut self, message: UniquePtr<StringBuffer>) {
unsafe {
v8_inspector__V8Inspector__Channel__sendNotification(self, message)
v8_inspector__V8Inspector__Channel__sendNotification(self, message);
}
}
pub fn flush_protocol_notifications(&mut self) {
unsafe {
v8_inspector__V8Inspector__Channel__flushProtocolNotifications(self)
v8_inspector__V8Inspector__Channel__flushProtocolNotifications(self);
}
}
}
Expand Down Expand Up @@ -419,7 +419,7 @@ mod tests {
self.log_call();
}
fn flush_protocol_notifications(&mut self) {
self.log_call()
self.log_call();
}
}

Expand Down Expand Up @@ -464,7 +464,7 @@ impl V8InspectorClient {
v8_inspector__V8InspectorClient__runMessageLoopOnPause(
self,
context_group_id,
)
);
}
}

Expand All @@ -477,7 +477,7 @@ impl V8InspectorClient {
v8_inspector__V8InspectorClient__runIfWaitingForDebugger(
self,
context_group_id,
)
);
}
}

Expand All @@ -502,7 +502,7 @@ impl V8InspectorClient {
line_number,
column_number,
stack_trace,
)
);
}
}

Expand Down Expand Up @@ -668,7 +668,7 @@ impl V8InspectorSession {

pub fn dispatch_protocol_message(&mut self, message: StringView) {
unsafe {
v8_inspector__V8InspectorSession__dispatchProtocolMessage(self, message)
v8_inspector__V8InspectorSession__dispatchProtocolMessage(self, message);
}
}

Expand All @@ -680,7 +680,7 @@ impl V8InspectorSession {
unsafe {
v8_inspector__V8InspectorSession__schedulePauseOnNextStatement(
self, reason, detail,
)
);
}
}
}
Expand Down Expand Up @@ -899,7 +899,7 @@ impl<'a, T> Deref for CharacterArray<'a, T> {
} = *self;
if m_characters.is_null() {
assert_eq!(m_length, 0);
m_characters = NonNull::dangling().as_ptr()
m_characters = NonNull::dangling().as_ptr();
};
unsafe { slice::from_raw_parts(m_characters, m_length) }
}
Expand Down Expand Up @@ -1002,7 +1002,7 @@ impl V8Inspector {
context_group_id,
human_readable_name,
aux_data,
)
);
}
}

Expand Down
24 changes: 12 additions & 12 deletions src/isolate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ impl Isolate {
/// between 0 and `Isolate::get_number_of_data_slots()`.
#[inline(always)]
pub fn set_data(&mut self, slot: u32, data: *mut c_void) {
self.set_data_internal(Self::INTERNAL_DATA_SLOT_COUNT + slot, data)
self.set_data_internal(Self::INTERNAL_DATA_SLOT_COUNT + slot, data);
}

/// Returns the maximum number of available embedder data slots. Valid slots
Expand Down Expand Up @@ -909,7 +909,7 @@ impl Isolate {
/// constructed and exited when dropped.
#[inline(always)]
pub unsafe fn enter(&mut self) {
v8__Isolate__Enter(self)
v8__Isolate__Enter(self);
}

/// Exits this isolate by restoring the previously entered one in the
Expand All @@ -922,7 +922,7 @@ impl Isolate {
/// constructed and exited when dropped.
#[inline(always)]
pub unsafe fn exit(&mut self) {
v8__Isolate__Exit(self)
v8__Isolate__Exit(self);
}

/// Optional notification that the system is running low on memory.
Expand Down Expand Up @@ -976,7 +976,7 @@ impl Isolate {
self,
capture,
frame_limit,
)
);
}
}

Expand Down Expand Up @@ -1024,7 +1024,7 @@ impl Isolate {
// it's empty. That is, you can't return None and that's why the Rust API
// expects Local<Value> instead of Option<Local<Value>>.
unsafe {
v8__Isolate__SetPrepareStackTraceCallback(self, callback.map_fn_to())
v8__Isolate__SetPrepareStackTraceCallback(self, callback.map_fn_to());
};
}

Expand Down Expand Up @@ -1071,7 +1071,7 @@ impl Isolate {
callback: HostInitializeImportMetaObjectCallback,
) {
unsafe {
v8__Isolate__SetHostInitializeImportMetaObjectCallback(self, callback)
v8__Isolate__SetHostInitializeImportMetaObjectCallback(self, callback);
}
}

Expand All @@ -1086,7 +1086,7 @@ impl Isolate {
v8__Isolate__SetHostImportModuleDynamicallyCallback(
self,
callback.to_c_fn(),
)
);
}
}

Expand Down Expand Up @@ -1164,7 +1164,7 @@ impl Isolate {
gc_type_filter: GCType,
) {
unsafe {
v8__Isolate__AddGCPrologueCallback(self, callback, data, gc_type_filter)
v8__Isolate__AddGCPrologueCallback(self, callback, data, gc_type_filter);
}
}

Expand Down Expand Up @@ -1204,7 +1204,7 @@ impl Isolate {
heap_limit: usize,
) {
unsafe {
v8__Isolate__RemoveNearHeapLimitCallback(self, callback, heap_limit)
v8__Isolate__RemoveNearHeapLimitCallback(self, callback, heap_limit);
};
}

Expand Down Expand Up @@ -1312,7 +1312,7 @@ impl Isolate {
v8__Isolate__DateTimeConfigurationChangeNotification(
self,
time_zone_detection,
)
);
}
}

Expand Down Expand Up @@ -1345,7 +1345,7 @@ impl Isolate {
GarbageCollectionType::Full => 0,
GarbageCollectionType::Minor => 1,
},
)
);
}
}

Expand Down Expand Up @@ -1385,7 +1385,7 @@ impl Isolate {

let arg = addr_of_mut!(callback);
unsafe {
v8__HeapProfiler__TakeHeapSnapshot(self, trampoline::<F>, arg as _)
v8__HeapProfiler__TakeHeapSnapshot(self, trampoline::<F>, arg as _);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/isolate_create_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ pub(crate) mod raw {
self,
initial_heap_size_in_bytes,
maximum_heap_size_in_bytes,
)
);
};
}

Expand All @@ -331,7 +331,7 @@ pub(crate) mod raw {
self,
physical_memory,
virtual_memory_limit,
)
);
}
}
}
Expand Down
Loading
Loading