mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr
This commit is contained in:
parent
1df3652e27
commit
7c0c1c8f49
214 changed files with 825 additions and 827 deletions
|
@ -156,7 +156,7 @@ JS::VM& main_thread_vm()
|
|||
// 2. Let script execution context be callback.[[HostDefined]].[[ActiveScriptContext]]. (NOTE: Not necessary)
|
||||
|
||||
// 3. Prepare to run a callback with incumbent settings.
|
||||
callback_host_defined.incumbent_settings.prepare_to_run_callback();
|
||||
callback_host_defined.incumbent_settings->prepare_to_run_callback();
|
||||
|
||||
// 4. If script execution context is not null, then push script execution context onto the JavaScript execution context stack.
|
||||
if (callback_host_defined.active_script_context)
|
||||
|
@ -172,7 +172,7 @@ JS::VM& main_thread_vm()
|
|||
}
|
||||
|
||||
// 7. Clean up after running a callback with incumbent settings.
|
||||
callback_host_defined.incumbent_settings.clean_up_after_running_callback();
|
||||
callback_host_defined.incumbent_settings->clean_up_after_running_callback();
|
||||
|
||||
// 8. Return result.
|
||||
return result;
|
||||
|
@ -419,7 +419,7 @@ void queue_mutation_observer_microtask(DOM::Document const& document)
|
|||
// 4. If records is not empty, then invoke mo’s callback with « records, mo », and mo. If this throws an exception, catch it, and report the exception.
|
||||
if (!records.is_empty()) {
|
||||
auto& callback = mutation_observer->callback();
|
||||
auto& realm = callback.callback_context.realm();
|
||||
auto& realm = callback.callback_context->realm();
|
||||
|
||||
auto wrapped_records = MUST(JS::Array::create(realm, 0));
|
||||
for (size_t i = 0; i < records.size(); ++i) {
|
||||
|
@ -446,7 +446,7 @@ NonnullOwnPtr<JS::ExecutionContext> create_a_new_javascript_realm(JS::VM& vm, Fu
|
|||
auto realm_execution_context = MUST(JS::Realm::initialize_host_defined_realm(vm, move(create_global_object), move(create_global_this_value)));
|
||||
|
||||
// 3. Remove realm execution context from the JavaScript execution context stack.
|
||||
vm.execution_context_stack().remove_first_matching([&realm_execution_context](auto* execution_context) {
|
||||
vm.execution_context_stack().remove_first_matching([&realm_execution_context](auto execution_context) {
|
||||
return execution_context == realm_execution_context.ptr();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue