1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:37:45 +00:00

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
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);
}