Browse Source

LibWeb: Use JS::SafeFunction for module fetching callbacks

This fixes another GC crash seen on https://shopify.com/

Found it by collecting garbage after every 500th heap allocation.
Andreas Kling 2 years ago
parent
commit
66c41e7c45
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Libraries/LibWeb/HTML/Scripting/Fetching.h

+ 1 - 1
Userland/Libraries/LibWeb/HTML/Scripting/Fetching.h

@@ -12,7 +12,7 @@
 
 
 namespace Web::HTML {
 namespace Web::HTML {
 
 
-using ModuleCallback = Function<void(JavaScriptModuleScript*)>;
+using ModuleCallback = JS::SafeFunction<void(JavaScriptModuleScript*)>;
 
 
 class DescendantFetchingContext : public RefCounted<DescendantFetchingContext> {
 class DescendantFetchingContext : public RefCounted<DescendantFetchingContext> {
 public:
 public: