diff --git a/src/execution/isolate.cc b/src/execution/isolate.cc index 7a0f3189cc..bd0453b2b7 100644 --- a/src/execution/isolate.cc +++ b/src/execution/isolate.cc @@ -693,7 +693,7 @@ StackTraceFailureMessage::StackTraceFailureMessage( FixedStringAllocator fixed(&js_stack_trace_[0], buffer_length - 1); StringStream accumulator(&fixed, StringStream::kPrintObjectConcise); isolate->PrintStack(&accumulator, Isolate::kPrintStackVerbose); - // Keeping a reference to the last code objects to increase likelyhood that + // Keeping a reference to the last code objects to increase likelihood that // they get included in the minidump. const size_t code_objects_length = arraysize(code_objects_); size_t i = 0; @@ -4069,13 +4069,13 @@ void Isolate::AddCrashKeysForIsolateAndHeapPointers() { } const v8::StartupData* data = Snapshot::DefaultSnapshotBlob(); // TODO(cbruni): Implement strategy to infrequently collect this. - const uint32_t v8_snapshot_checkum_calculated = 0; + const uint32_t v8_snapshot_checksum_calculated = 0; add_crash_key_callback_(v8::CrashKeyId::kSnapshotChecksumCalculated, - ToHexString(v8_snapshot_checkum_calculated)); - const uint32_t v8_snapshot_checkum_expected = + ToHexString(v8_snapshot_checksum_calculated)); + const uint32_t v8_snapshot_checksum_expected = Snapshot::GetExpectedChecksum(data); add_crash_key_callback_(v8::CrashKeyId::kSnapshotChecksumExpected, - ToHexString(v8_snapshot_checkum_expected)); + ToHexString(v8_snapshot_checksum_expected)); } void Isolate::InitializeCodeRanges() { @@ -4614,7 +4614,7 @@ bool Isolate::Init(SnapshotData* startup_snapshot_data, nullptr); // Isolate initialization allocates long living objects that should be - // pretentured to old space. + // pretenured to old space. DCHECK_IMPLIES(heap()->new_space(), (heap()->new_space()->Size() == 0) && (heap()->gc_count() == 0)); @@ -5132,7 +5132,7 @@ MaybeHandle Isolate::RunHostImportModuleDynamicallyCallback( ToApiHandle(import_assertions_array)), MaybeHandle()); } else { - // TODO(cbruni, v8:12302): Avoid creating tempory ScriptOrModule objects. + // TODO(cbruni, v8:12302): Avoid creating temporary ScriptOrModule objects. auto script_or_module = i::Handle::cast( this->factory()->NewStruct(i::SCRIPT_OR_MODULE_TYPE)); script_or_module->set_resource_name(*resource_name); diff --git a/src/execution/isolate.h b/src/execution/isolate.h index ef389a4b11..78895afe10 100644 --- a/src/execution/isolate.h +++ b/src/execution/isolate.h @@ -553,7 +553,7 @@ using DebugObjectCache = std::vector>; inline type name() const { return thread_local_top()->name##_; } #define THREAD_LOCAL_TOP_ADDRESS(type, name) \ - type* name##_address() { return &thread_local_top()->name##_; } + inline type* name##_address() { return &thread_local_top()->name##_; } // HiddenFactory exists so Isolate can privately inherit from it without making // Factory's members available to Isolate directly. @@ -681,7 +681,7 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory { // at the same time, this should be prevented using external locking. void Enter(); - // Exits the current thread. The previosuly entered Isolate is restored + // Exits the current thread. The previously entered Isolate is restored // for the thread. // Not thread-safe. Multiple threads should not Enter/Exit the same isolate // at the same time, this should be prevented using external locking. @@ -1519,7 +1519,7 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory { DCHECK_NOT_NULL(optimizing_compile_dispatcher_); return optimizing_compile_dispatcher_; } - // Flushes all pending concurrent optimzation jobs from the optimizing + // Flushes all pending concurrent optimization jobs from the optimizing // compile dispatcher's queue. void AbortConcurrentOptimization(BlockingBehavior blocking_behavior); @@ -1728,7 +1728,8 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory { const uint8_t* embedded_blob_data() const; uint32_t embedded_blob_data_size() const; - // Returns true if short bultin calls optimization is enabled for the Isolate. + // Returns true if short builtin calls optimization is enabled for the + // Isolate. bool is_short_builtin_calls_enabled() const { return V8_SHORT_BUILTIN_CALLS_BOOL && is_short_builtin_calls_enabled_; } @@ -2297,7 +2298,7 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory { // True if this isolate was initialized from a snapshot. bool initialized_from_snapshot_ = false; - // True if short bultin calls optimization is enabled. + // True if short builtin calls optimization is enabled. bool is_short_builtin_calls_enabled_ = false; // True if the isolate is in background. This flag is used @@ -2555,6 +2556,7 @@ extern thread_local Isolate* g_current_isolate_ V8_CONSTINIT; #undef FIELD_ACCESSOR #undef THREAD_LOCAL_TOP_ACCESSOR +#undef THREAD_LOCAL_TOP_ADDRESS // SaveContext scopes save the current context on the Isolate on creation, and // restore it on destruction. diff --git a/src/heap/heap.cc b/src/heap/heap.cc index b0ba3fa847..49bd3ad759 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc @@ -3937,8 +3937,8 @@ void Heap::NotifyObjectSizeChange( void Heap::UpdateInvalidatedObjectSize(HeapObject object, int new_size) { if (!MayContainRecordedSlots(object)) return; - // Updating invalidated_slots is unsychronized and thus needs to happen on the - // main thread. + // Updating invalidated_slots is unsynchronized and thus needs to happen on + // the main thread. DCHECK_NULL(LocalHeap::Current()); DCHECK_EQ(isolate()->thread_id(), ThreadId::Current());