cleanup: Fix some typos

Mostly in comments, again, not much to be said...

Bug: v8:12425
Change-Id: I75b4b244e6fa259a29f6cf28bd8258b035af4be6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673536
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80808}
This commit is contained in:
Nikolaos Papaspyrou 2022-05-27 17:26:16 +02:00 committed by V8 LUCI CQ
parent 462b2fb5c6
commit 2117278882
8 changed files with 15 additions and 15 deletions

View File

@ -88,7 +88,7 @@ class V8_EXPORT_PRIVATE LocalEmbedderHeapTracer final {
~LocalEmbedderHeapTracer() {
if (remote_tracer_) remote_tracer_->v8_isolate_ = nullptr;
// CppHeap is not detached from Isolate here. Detaching is done explciitly
// CppHeap is not detached from Isolate here. Detaching is done explicitly
// on Isolate/Heap/CppHeap destruction.
}

View File

@ -977,7 +977,7 @@ HeapObject FactoryBase<Impl>::AllocateRawWithImmortalMap(
AllocationAlignment alignment) {
// TODO(delphick): Potentially you could also pass a immortal immovable Map
// from MAP_SPACE here, like external_map or message_object_map, but currently
// noone does so this check is sufficient.
// no one does so this check is sufficient.
DCHECK(ReadOnlyHeap::Contains(map));
HeapObject result = AllocateRaw(size, allocation, alignment);
DisallowGarbageCollection no_gc;

View File

@ -194,7 +194,7 @@ class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) FactoryBase
int32_t end_position,
Handle<PreparseData>);
// Allocates a FeedbackMedata object and zeroes the data section.
// Allocates a FeedbackMetadata object and zeroes the data section.
Handle<FeedbackMetadata> NewFeedbackMetadata(
int slot_count, int create_closure_slot_count,
AllocationType allocation = AllocationType::kOld);

View File

@ -310,7 +310,7 @@ class V8_EXPORT_PRIVATE Factory : public FactoryBase<Factory> {
// A table is used for Latin1 codes.
Handle<String> LookupSingleCharacterStringFromCode(uint16_t code);
// Create or lookup a single characters tring made up of a utf16 surrogate
// Create or lookup a single character string made up of a utf16 surrogate
// pair.
Handle<String> NewSurrogatePairString(uint16_t lead, uint16_t trail);

View File

@ -138,7 +138,7 @@ class FreeList {
// and the size should be a non-zero multiple of the word size.
virtual size_t Free(Address start, size_t size_in_bytes, FreeMode mode);
// Allocates a free space node frome the free list of at least size_in_bytes
// Allocates a free space node from the free list of at least size_in_bytes
// bytes. Returns the actual node size in node_size which can be bigger than
// size_in_bytes. This method returns null if the allocation request cannot be
// handled by the free list.
@ -473,7 +473,7 @@ class V8_EXPORT_PRIVATE FreeListManyCachedFastPath : public FreeListManyCached {
};
// Uses FreeListManyCached if in the GC; FreeListManyCachedFastPath otherwise.
// The reasonning behind this FreeList is the following: the GC runs in
// The reasoning behind this FreeList is the following: the GC runs in
// parallel, and therefore, more expensive allocations there are less
// noticeable. On the other hand, the generated code and runtime need to be very
// fast. Therefore, the strategy for the former is one that is not very

View File

@ -93,7 +93,7 @@ int WriteBarrier::MarkingFromCode(Address raw_host, Address raw_slot) {
}
#endif
WriteBarrier::Marking(host, slot, MaybeObject(value));
// Called by WriteBarrierCodeStubAssembler, which doesnt accept void type
// Called by WriteBarrierCodeStubAssembler, which doesn't accept void type
return 0;
}

View File

@ -3772,7 +3772,7 @@ bool Heap::HasHighFragmentation() {
bool Heap::HasHighFragmentation(size_t used, size_t committed) {
const size_t kSlack = 16 * MB;
// Fragmentation is high if committed > 2 * used + kSlack.
// Rewrite the exression to avoid overflow.
// Rewrite the expression to avoid overflow.
DCHECK_GE(committed, used);
return committed - used > used + kSlack;
}

View File

@ -4743,33 +4743,33 @@ TEST(SourceInfo) {
}
}
// Test first positon.
// Test first position.
CHECK_EQ(script->GetSourceLocation(0).GetLineNumber(), 0);
CHECK_EQ(script->GetSourceLocation(0).GetColumnNumber(), 0);
// Test second positon.
// Test second position.
CHECK_EQ(script->GetSourceLocation(1).GetLineNumber(), 0);
CHECK_EQ(script->GetSourceLocation(1).GetColumnNumber(), 1);
// Test first positin in function a().
// Test first position in function a().
const int start_a =
static_cast<int>(strstr(source, "function a") - source) + 10;
CHECK_EQ(script->GetSourceLocation(start_a).GetLineNumber(), 1);
CHECK_EQ(script->GetSourceLocation(start_a).GetColumnNumber(), 10);
// Test first positin in function b().
// Test first position in function b().
const int start_b =
static_cast<int>(strstr(source, "function b") - source) + 13;
CHECK_EQ(script->GetSourceLocation(start_b).GetLineNumber(), 2);
CHECK_EQ(script->GetSourceLocation(start_b).GetColumnNumber(), 13);
// Test first positin in function c().
// Test first position in function c().
const int start_c =
static_cast<int>(strstr(source, "function c") - source) + 10;
CHECK_EQ(script->GetSourceLocation(start_c).GetLineNumber(), 5);
CHECK_EQ(script->GetSourceLocation(start_c).GetColumnNumber(), 12);
// Test first positin in function d().
// Test first position in function d().
const int start_d =
static_cast<int>(strstr(source, "function d") - source) + 10;
CHECK_EQ(script->GetSourceLocation(start_d).GetLineNumber(), 12);
@ -5561,7 +5561,7 @@ TEST(TerminateOnResumeAtUnhandledRejectionCppImpl) {
auto data = std::make_pair(isolate, &env);
v8::debug::SetDebugDelegate(env->GetIsolate(), &delegate);
{
// We want to trigger a breapoint upon Promise rejection, but we will only
// We want to trigger a breakpoint upon Promise rejection, but we will only
// get the callback if there is at least one JavaScript frame in the stack.
v8::Local<v8::Function> func =
v8::Function::New(env.local(), RejectPromiseThroughCpp,