mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:18:14 +00:00
LibJS: Make Cell::initialize() return void
Stop worrying about tiny OOMs. Work towards #20405
This commit is contained in:
parent
fde26c53f0
commit
18c54d8d40
804 changed files with 1330 additions and 2171 deletions
|
@ -40,21 +40,18 @@ WindowOrWorkerGlobalScopeMixin::~WindowOrWorkerGlobalScopeMixin() = default;
|
|||
__ENUMERATE_SUPPORTED_PERFORMANCE_ENTRY_TYPES(PerformanceTimeline::EntryTypes::mark, UserTiming::PerformanceMark) \
|
||||
__ENUMERATE_SUPPORTED_PERFORMANCE_ENTRY_TYPES(PerformanceTimeline::EntryTypes::measure, UserTiming::PerformanceMeasure)
|
||||
|
||||
JS::ThrowCompletionOr<void> WindowOrWorkerGlobalScopeMixin::initialize(JS::Realm& realm)
|
||||
void WindowOrWorkerGlobalScopeMixin::initialize(JS::Realm&)
|
||||
{
|
||||
auto& vm = realm.vm();
|
||||
|
||||
#define __ENUMERATE_SUPPORTED_PERFORMANCE_ENTRY_TYPES(entry_type, cpp_class) \
|
||||
TRY_OR_THROW_OOM(vm, m_performance_entry_buffer_map.try_set(entry_type, PerformanceTimeline::PerformanceEntryTuple { \
|
||||
.performance_entry_buffer = {}, \
|
||||
.max_buffer_size = cpp_class::max_buffer_size(), \
|
||||
.available_from_timeline = cpp_class::available_from_timeline(), \
|
||||
.dropped_entries_count = 0, \
|
||||
}));
|
||||
#define __ENUMERATE_SUPPORTED_PERFORMANCE_ENTRY_TYPES(entry_type, cpp_class) \
|
||||
m_performance_entry_buffer_map.set(entry_type, \
|
||||
PerformanceTimeline::PerformanceEntryTuple { \
|
||||
.performance_entry_buffer = {}, \
|
||||
.max_buffer_size = cpp_class::max_buffer_size(), \
|
||||
.available_from_timeline = cpp_class::available_from_timeline(), \
|
||||
.dropped_entries_count = 0, \
|
||||
});
|
||||
ENUMERATE_SUPPORTED_PERFORMANCE_ENTRY_TYPES
|
||||
#undef __ENUMERATE_SUPPORTED_PERFORMANCE_ENTRY_TYPES
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void WindowOrWorkerGlobalScopeMixin::visit_edges(JS::Cell::Visitor& visitor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue