LibJS+LibWeb: Restore type safety of Realm::set_global_object()

The changes from 8a03b17 to allow any JS::Value aren't a good fit, as
shown by the excessive amount of verify_cast needed :^)
This commit is contained in:
Linus Groh
2022-08-06 01:01:13 +01:00
committed by Andreas Kling
parent 64b29eb459
commit c8f1651761
Notes: sideshowbarker 2024-07-17 08:24:07 +09:00
10 changed files with 27 additions and 36 deletions

View File

@@ -49,6 +49,6 @@ struct WebEngineCustomJobCallbackData final : public JS::JobCallback::CustomData
HTML::ClassicScript* active_script();
JS::VM& main_thread_vm();
void queue_mutation_observer_microtask(DOM::Document&);
NonnullOwnPtr<JS::ExecutionContext> create_a_new_javascript_realm(JS::VM&, Function<JS::Value(JS::Realm&)> create_global_object, Function<JS::Value(JS::Realm&)> create_global_this_value);
NonnullOwnPtr<JS::ExecutionContext> create_a_new_javascript_realm(JS::VM&, Function<JS::GlobalObject*(JS::Realm&)> create_global_object, Function<JS::GlobalObject*(JS::Realm&)> create_global_this_value);
}