mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 18:37:35 +00:00
Everywhere: Fix many spelling errors
This commit is contained in:
parent
6bf91d00ef
commit
3102d8e160
39 changed files with 73 additions and 73 deletions
|
@ -366,10 +366,10 @@ MaybeLoaderError FlacLoaderPlugin::next_frame(Span<Sample> target_vector)
|
|||
Sample frame = { left[i] / sample_rescale, right[i] / sample_rescale };
|
||||
target_vector[i] = frame;
|
||||
}
|
||||
// move superflous data into the class buffer instead
|
||||
// move superfluous data into the class buffer instead
|
||||
auto result = m_unread_data.try_grow_capacity(m_current_frame->sample_count - samples_to_directly_copy);
|
||||
if (result.is_error())
|
||||
return LoaderError { LoaderError::Category::Internal, static_cast<size_t>(samples_to_directly_copy + m_current_sample_or_frame), "Couldn't allocate sample buffer for superflous data" };
|
||||
return LoaderError { LoaderError::Category::Internal, static_cast<size_t>(samples_to_directly_copy + m_current_sample_or_frame), "Couldn't allocate sample buffer for superfluous data" };
|
||||
|
||||
for (size_t i = samples_to_directly_copy; i < m_current_frame->sample_count; ++i) {
|
||||
Sample frame = { left[i] / sample_rescale, right[i] / sample_rescale };
|
||||
|
@ -630,7 +630,7 @@ ErrorOr<Vector<i32>, LoaderError> FlacLoaderPlugin::decode_custom_lpc(FlacSubfra
|
|||
for (size_t t = 0; t < subframe.order; ++t) {
|
||||
// It's really important that we compute in 64-bit land here.
|
||||
// Even though FLAC operates at a maximum bit depth of 32 bits, modern encoders use super-large coefficients for maximum compression.
|
||||
// These will easily overflow 32 bits and cause strange white noise that apruptly stops intermittently (at the end of a frame).
|
||||
// These will easily overflow 32 bits and cause strange white noise that abruptly stops intermittently (at the end of a frame).
|
||||
// The simple fix of course is to do intermediate computations in 64 bits.
|
||||
sample += static_cast<i64>(coefficients[t]) * static_cast<i64>(decoded[i - t - 1]);
|
||||
}
|
||||
|
|
|
@ -180,10 +180,10 @@ bool DeflateDecompressor::UncompressedBlock::try_read_more()
|
|||
if (m_bytes_remaining == 0)
|
||||
return false;
|
||||
|
||||
const auto nread = min(m_bytes_remaining, m_decompressor.m_output_stream.remaining_contigous_space());
|
||||
const auto nread = min(m_bytes_remaining, m_decompressor.m_output_stream.remaining_contiguous_space());
|
||||
m_bytes_remaining -= nread;
|
||||
|
||||
m_decompressor.m_input_stream >> m_decompressor.m_output_stream.reserve_contigous_space(nread);
|
||||
m_decompressor.m_input_stream >> m_decompressor.m_output_stream.reserve_contiguous_space(nread);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -435,7 +435,7 @@ size_t EventLoop::pump(WaitMode mode)
|
|||
void EventLoop::post_event(Object& receiver, NonnullOwnPtr<Event>&& event)
|
||||
{
|
||||
Threading::MutexLocker lock(m_private->lock);
|
||||
dbgln_if(EVENTLOOP_DEBUG, "Core::EventLoop::post_event: ({}) << receivier={}, event={}", m_queued_events.size(), receiver, event);
|
||||
dbgln_if(EVENTLOOP_DEBUG, "Core::EventLoop::post_event: ({}) << receiver={}, event={}", m_queued_events.size(), receiver, event);
|
||||
m_queued_events.empend(receiver, move(event));
|
||||
}
|
||||
|
||||
|
@ -522,7 +522,7 @@ void EventLoop::handle_signal(int signo)
|
|||
VERIFY(signo != 0);
|
||||
// We MUST check if the current pid still matches, because there
|
||||
// is a window between fork() and exec() where a signal delivered
|
||||
// to our fork could be inadvertedly routed to the parent process!
|
||||
// to our fork could be inadvertently routed to the parent process!
|
||||
if (getpid() == s_pid) {
|
||||
int nwritten = write(s_wake_pipe_fds[1], &signo, sizeof(signo));
|
||||
if (nwritten < 0) {
|
||||
|
|
|
@ -183,7 +183,7 @@ done_parsing:;
|
|||
if (offset_hours.has_value() || offset_minutes.has_value())
|
||||
dbgln("FIXME: Implement GeneralizedTime with offset!");
|
||||
|
||||
// Unceremonially drop the milliseconds on the floor.
|
||||
// Unceremoniously drop the milliseconds on the floor.
|
||||
return Core::DateTime::create(year.value(), month.value(), day.value(), hour.value(), minute.value_or(0), seconds.value_or(0));
|
||||
}
|
||||
|
||||
|
|
|
@ -383,7 +383,7 @@ void pretty_print(Decoder& decoder, OutputStream& stream, int indent)
|
|||
}
|
||||
case Kind::Sequence:
|
||||
case Kind::Set:
|
||||
dbgln("Seq/Sequence PrettyPrint error: Unexpected Primtive");
|
||||
dbgln("Seq/Sequence PrettyPrint error: Unexpected Primitive");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ void UnsignedBigIntegerAlgorithms::almost_montgomery_multiplication_without_allo
|
|||
UnsignedBigInteger::Word t = z.m_words[i] * k;
|
||||
UnsignedBigInteger::Word carry_2 = montgomery_fragment(z, i, modulo, t, num_words);
|
||||
|
||||
// Compute the carry by combining all of the carrys of the previous computations
|
||||
// Compute the carry by combining all of the carries of the previous computations
|
||||
// Put it "right after" the range that we computed above
|
||||
UnsignedBigInteger::Word temp_carry = previous_double_carry + carry_1;
|
||||
UnsignedBigInteger::Word overall_carry = temp_carry + carry_2;
|
||||
|
|
|
@ -104,7 +104,7 @@ OwnPtr<DebugSession> DebugSession::exec_and_attach(String const& command,
|
|||
return {};
|
||||
}
|
||||
|
||||
// We want to continue until the exit from the 'execve' sycsall.
|
||||
// We want to continue until the exit from the 'execve' syscall.
|
||||
// This ensures that when we start debugging the process
|
||||
// it executes the target image, and not the forked image of the tracing process.
|
||||
// NOTE: we only need to do this when we are debugging a new process (i.e not attaching to a process that's already running!)
|
||||
|
|
|
@ -144,7 +144,7 @@ private:
|
|||
HashMap<void*, BreakPoint> m_breakpoints;
|
||||
HashMap<void*, WatchPoint> m_watchpoints;
|
||||
|
||||
// Maps from library name to LoadedLibrary obect
|
||||
// Maps from library name to LoadedLibrary object
|
||||
HashMap<String, NonnullOwnPtr<LoadedLibrary>> m_loaded_libraries;
|
||||
};
|
||||
|
||||
|
@ -245,7 +245,7 @@ void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callbac
|
|||
if (current_breakpoint.has_value()) {
|
||||
// We want to make the breakpoint transparent to the user of the debugger.
|
||||
// To achieve this, we perform two rollbacks:
|
||||
// 1. Set regs.eip to point at the actual address of the instruction we breaked on.
|
||||
// 1. Set regs.eip to point at the actual address of the instruction we broke on.
|
||||
// regs.eip currently points to one byte after the address of the original instruction,
|
||||
// because the cpu has just executed the INT3 we patched into the instruction.
|
||||
// 2. We restore the original first byte of the instruction,
|
||||
|
@ -285,9 +285,9 @@ void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callbac
|
|||
// To re-enable the breakpoint, we first perform a single step and execute the
|
||||
// instruction of the breakpoint, and then redo the INT3 patch in its first byte.
|
||||
|
||||
// If the user manually inserted a breakpoint at were we breaked at originally,
|
||||
// we need to disable that breakpoint because we want to singlestep over it to execute the
|
||||
// instruction we breaked on (we re-enable it again later anyways).
|
||||
// If the user manually inserted a breakpoint at the current instruction,
|
||||
// we need to disable that breakpoint because we want to singlestep over that
|
||||
// instruction (we re-enable it again later anyways).
|
||||
if (m_breakpoints.contains(current_breakpoint.value().address) && m_breakpoints.get(current_breakpoint.value().address).value().state == BreakPointState::Enabled) {
|
||||
disable_breakpoint(current_breakpoint.value().address);
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ void LineProgram::handle_standard_opcode(u8 opcode)
|
|||
m_basic_block = true;
|
||||
break;
|
||||
}
|
||||
case StandardOpcodes::SetProlougeEnd: {
|
||||
case StandardOpcodes::SetPrologueEnd: {
|
||||
m_prologue_end = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ private:
|
|||
SetBasicBlock,
|
||||
ConstAddPc,
|
||||
FixAdvancePc,
|
||||
SetProlougeEnd,
|
||||
SetPrologueEnd,
|
||||
SetEpilogueBegin,
|
||||
SetIsa
|
||||
};
|
||||
|
|
|
@ -714,7 +714,7 @@ static ErrorOr<void> decode_png_bitmap(PNGLoadingContext& context)
|
|||
return Error::from_string_literal("PNGImageDecoderPlugin: Didn't see an IHDR chunk."sv);
|
||||
|
||||
if (context.color_type == 3 && context.palette_data.is_empty())
|
||||
return Error::from_string_literal("PNGImageDecoderPlugin: Didn't see a PLTE chunk for a palettized image, or it was empty."sv);
|
||||
return Error::from_string_literal("PNGImageDecoderPlugin: Didn't see a PLTE chunk for a palletized image, or it was empty."sv);
|
||||
|
||||
auto result = Compress::Zlib::decompress_all(context.compressed_data.span());
|
||||
if (!result.has_value()) {
|
||||
|
|
|
@ -1164,7 +1164,7 @@ void TryStatement::generate_bytecode(Bytecode::Generator& generator) const
|
|||
}
|
||||
},
|
||||
[&](NonnullRefPtr<BindingPattern> const&) {
|
||||
// FIXME: Implement this path when the above DeclrativeEnvironment issue is dealt with.
|
||||
// FIXME: Implement this path when the above DeclarativeEnvironment issue is dealt with.
|
||||
TODO();
|
||||
});
|
||||
|
||||
|
|
|
@ -106,8 +106,8 @@ Optional<Certificate> Certificate::parse_asn1(ReadonlyBytes buffer, bool)
|
|||
// validity Validity,
|
||||
// subject Name,
|
||||
// subject_public_key_info SubjectPublicKeyInfo,
|
||||
// issuer_unique_id (1) IMPLICIT UniqueIdentifer OPTIONAL (if present, version > v1),
|
||||
// subject_unique_id (2) IMPLICIT UniqueIdentiier OPTIONAL (if present, version > v1),
|
||||
// issuer_unique_id (1) IMPLICIT UniqueIdentifier OPTIONAL (if present, version > v1),
|
||||
// subject_unique_id (2) IMPLICIT UniqueIdentifier OPTIONAL (if present, version > v1),
|
||||
// extensions (3) EXPLICIT Extensions OPTIONAL (if present, version > v2)
|
||||
// }
|
||||
ENTER_SCOPE_OR_FAIL(Sequence, "Certificate::TBSCertificate");
|
||||
|
@ -413,7 +413,7 @@ Optional<Certificate> Certificate::parse_asn1(ReadonlyBytes buffer, bool)
|
|||
case 3:
|
||||
// x400Address
|
||||
// We don't know how to use this.
|
||||
DROP_OBJECT_OR_FAIL("Certificate::TBSCertificate::Extensions::$::Extension::extension_value::SubjectAlternativeName::$::X400Adress");
|
||||
DROP_OBJECT_OR_FAIL("Certificate::TBSCertificate::Extensions::$::Extension::extension_value::SubjectAlternativeName::$::X400Address");
|
||||
break;
|
||||
case 4:
|
||||
// Directory name
|
||||
|
|
|
@ -187,7 +187,7 @@ void TLSv12::update_packet(ByteBuffer& packet)
|
|||
// copy the header over
|
||||
ct.overwrite(0, packet.data(), header_size - 2);
|
||||
|
||||
// get the appropricate HMAC value for the entire packet
|
||||
// get the appropriate HMAC value for the entire packet
|
||||
auto mac = hmac_message(packet, {}, mac_size, true);
|
||||
|
||||
// write the MAC
|
||||
|
|
|
@ -174,7 +174,7 @@ void TLSv12::try_disambiguate_error() const
|
|||
|
||||
void TLSv12::set_root_certificates(Vector<Certificate> certificates)
|
||||
{
|
||||
if (!m_context.root_ceritificates.is_empty())
|
||||
if (!m_context.root_certificates.is_empty())
|
||||
dbgln("TLS warn: resetting root certificates!");
|
||||
|
||||
for (auto& cert : certificates) {
|
||||
|
@ -182,7 +182,7 @@ void TLSv12::set_root_certificates(Vector<Certificate> certificates)
|
|||
dbgln("Certificate for {} by {} is invalid, things may or may not work!", cert.subject.subject, cert.issuer.subject);
|
||||
// FIXME: Figure out what we should do when our root certs are invalid.
|
||||
}
|
||||
m_context.root_ceritificates = move(certificates);
|
||||
m_context.root_certificates = move(certificates);
|
||||
}
|
||||
|
||||
bool Context::verify_chain() const
|
||||
|
@ -202,7 +202,7 @@ bool Context::verify_chain() const
|
|||
HashMap<String, String> chain;
|
||||
HashTable<String> roots;
|
||||
// First, walk the root certs.
|
||||
for (auto& cert : root_ceritificates) {
|
||||
for (auto& cert : root_certificates) {
|
||||
roots.set(cert.subject.subject);
|
||||
chain.set(cert.subject.subject, cert.issuer.subject);
|
||||
}
|
||||
|
|
|
@ -295,7 +295,7 @@ struct Context {
|
|||
// message flags
|
||||
u8 handshake_messages[11] { 0 };
|
||||
ByteBuffer user_data;
|
||||
Vector<Certificate> root_ceritificates;
|
||||
Vector<Certificate> root_certificates;
|
||||
|
||||
Vector<String> alpn;
|
||||
StringView negotiated_alpn;
|
||||
|
|
|
@ -245,7 +245,7 @@ void BytecodeInterpreter::store_to_memory(Configuration& configuration, Instruct
|
|||
dbgln("LibWasm: Memory access out of bounds (expected 0 <= {} and {} <= {})", instance_address, instance_address + data.size(), memory->size());
|
||||
return;
|
||||
}
|
||||
dbgln_if(WASM_TRACE_DEBUG, "tempoaray({}b) -> store({})", data.size(), instance_address);
|
||||
dbgln_if(WASM_TRACE_DEBUG, "temporary({}b) -> store({})", data.size(), instance_address);
|
||||
data.copy_to(memory->data().bytes().slice(instance_address, data.size()));
|
||||
}
|
||||
|
||||
|
|
|
@ -849,10 +849,10 @@ ParseResult<MemorySection::Memory> MemorySection::Memory::parse(InputStream& str
|
|||
ParseResult<MemorySection> MemorySection::parse(InputStream& stream)
|
||||
{
|
||||
ScopeLogger<WASM_BINPARSER_DEBUG> logger("MemorySection");
|
||||
auto memorys = parse_vector<Memory>(stream);
|
||||
if (memorys.is_error())
|
||||
return memorys.error();
|
||||
return MemorySection { memorys.release_value() };
|
||||
auto memories = parse_vector<Memory>(stream);
|
||||
if (memories.is_error())
|
||||
return memories.error();
|
||||
return MemorySection { memories.release_value() };
|
||||
}
|
||||
|
||||
ParseResult<Expression> Expression::parse(InputStream& stream)
|
||||
|
|
|
@ -619,8 +619,8 @@ public:
|
|||
public:
|
||||
static constexpr u8 section_id = 5;
|
||||
|
||||
explicit MemorySection(Vector<Memory> memorys)
|
||||
: m_memories(move(memorys))
|
||||
explicit MemorySection(Vector<Memory> memories)
|
||||
: m_memories(move(memories))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue