0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2025-03-09 05:27:08 -04:00

Reflow comments and strings that exceed the 80-char column limit (#407)

This commit is contained in:
Bert Belder 2020-06-17 05:05:01 +02:00
parent acdcede4d6
commit 54f6bfe8c1
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
10 changed files with 23 additions and 19 deletions

View file

@ -132,7 +132,8 @@ fn platform() -> &'static str {
fn download_ninja_gn_binaries() {
let root = env::current_dir().unwrap();
let out_dir = env::var_os("OUT_DIR").expect(
"The 'OUT_DIR' environment is not set (it should be something like 'target/debug/rusty_v8-{hash}').",
"The 'OUT_DIR' environment is not set (it should be something like \
'target/debug/rusty_v8-{hash}').",
);
let out_dir_abs = root.join(out_dir);
// This would be target/debug or target/release

View file

@ -355,8 +355,8 @@ impl_partial_eq! { ObjectTemplate for Template use identity }
/// temporary functions that can be collected using Scripts is
/// preferred.
///
/// Any modification of a FunctionTemplate after first instantiation will trigger
/// a crash.
/// Any modification of a FunctionTemplate after first instantiation will
/// trigger a crash.
///
/// A FunctionTemplate can have properties, these properties are added to the
/// function object when it is created.

View file

@ -404,8 +404,8 @@ pub(crate) struct IsolateAnnex {
create_param_allocations: Box<dyn Any>,
slots: HashMap<TypeId, RefCell<Box<dyn Any>>>,
// The `isolate` and `isolate_mutex` fields are there so an `IsolateHandle`
// (which may outlive the isolate itself) can determine whether the isolate is
// still alive, and if so, get a reference to it. Safety rules:
// (which may outlive the isolate itself) can determine whether the isolate
// is still alive, and if so, get a reference to it. Safety rules:
// - The 'main thread' must lock the mutex and reset `isolate` to null just
// before the isolate is disposed.
// - Any other thread must lock the mutex while it's reading/using the

View file

@ -34,8 +34,8 @@ impl CreateParams {
self
}
/// The ArrayBuffer::ArrayBufferAllocator to use for allocating and freeing the backing
/// store of ArrayBuffers.
/// The ArrayBuffer::ArrayBufferAllocator to use for allocating and freeing
/// the backing store of ArrayBuffers.
pub fn array_buffer_allocator(
mut self,
array_buffer_allocator: impl Into<SharedPtr<ArrayBufferAllocator>>,

View file

@ -61,7 +61,8 @@
//! the necessity to import the MapFnTo trait.
//! - Fully integrate TryCatch blocks into the scope system (currently a
//! TryCatch works like a scope internally but it's not integrated).
//! - Add methods to some on some of the scopes like get_context() for ContextScope.
//! - Add methods to some on some of the scopes like get_context() for
//! ContextScope.
//! - Rename/reorganize/document.
#![allow(clippy::missing_safety_doc)]

View file

@ -296,7 +296,8 @@ impl Array {
unsafe { scope.to_local(ptr) }.unwrap()
}
/// Creates a JavaScript array out of a Local<Value> array with a known length.
/// Creates a JavaScript array out of a Local<Value> array with a known
/// length.
pub fn new_with_elements<'sc>(
scope: &mut impl ToLocal<'sc>,
elements: &[Local<Value>],

View file

@ -126,8 +126,8 @@ impl SnapshotCreator {
}
}
/// This is marked unsafe because it should be called at most once per snapshot
/// creator.
/// This is marked unsafe because it should be called at most once per
/// snapshot creator.
// TODO Because the SnapshotCreator creates its own isolate, we need a way to
// get an owned handle to it. This is a questionable design which ought to be
// revisited after the libdeno integration is complete.

View file

@ -317,9 +317,9 @@ pub(crate) enum Allocation<T: ?Sized + 'static> {
Rc(Rc<T>),
UniqueRef(UniqueRef<T>),
Other(Box<dyn Borrow<T> + 'static>),
// Note: it would be nice to add `SharedRef` to this list, but it requires the
// `T: Shared` bound, and it's unfortunately not possible to set bounds on
// individual enum variants.
// Note: it would be nice to add `SharedRef` to this list, but it
// requires the `T: Shared` bound, and it's unfortunately not possible
// to set bounds on individual enum variants.
}
impl<T: ?Sized + 'static> Allocation<T> {

View file

@ -146,7 +146,8 @@ impl<'tc> TryCatch<'tc> {
/// Clears any exceptions that may have been caught by this try/catch block.
/// After this method has been called, HasCaught() will return false. Cancels
/// the scheduled exception if it is caught and ReThrow() is not called before.
/// the scheduled exception if it is caught and ReThrow() is not called
/// before.
///
/// It is not necessary to clear a try/catch block before using it again; if
/// another exception is thrown the previously caught exception will just be

View file

@ -1368,8 +1368,8 @@ fn promise_resolved() {
let result = promise.result(scope);
let result_str = result.to_string(scope).unwrap();
assert_eq!(result_str.to_rust_string_lossy(scope), "test".to_string());
// Resolve again with different value, since promise is already in `Fulfilled` state
// it should be ignored.
// Resolve again with different value, since promise is already in
// `Fulfilled` state it should be ignored.
let value = v8::String::new(scope, "test2").unwrap();
resolver.resolve(context, value.into());
let result = promise.result(scope);
@ -1401,8 +1401,8 @@ fn promise_rejected() {
let result = promise.result(scope);
let result_str = result.to_string(scope).unwrap();
assert_eq!(result_str.to_rust_string_lossy(scope), "test".to_string());
// Reject again with different value, since promise is already in `Rejected` state
// it should be ignored.
// Reject again with different value, since promise is already in `Rejected`
// state it should be ignored.
let value = v8::String::new(scope, "test2").unwrap();
resolver.reject(context, value.into());
let result = promise.result(scope);