mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +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:
parent
64b29eb459
commit
c8f1651761
10 changed files with 27 additions and 36 deletions
|
@ -367,7 +367,7 @@ void queue_mutation_observer_microtask(DOM::Document& document)
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#creating-a-new-javascript-realm
|
||||
NonnullOwnPtr<JS::ExecutionContext> create_a_new_javascript_realm(JS::VM& 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& vm, Function<JS::GlobalObject*(JS::Realm&)> create_global_object, Function<JS::GlobalObject*(JS::Realm&)> create_global_this_value)
|
||||
{
|
||||
// 1. Perform InitializeHostDefinedRealm() with the provided customizations for creating the global object and the global this binding.
|
||||
// 2. Let realm execution context be the running JavaScript execution context.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue