Explorar o código

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 %!s(int64=2) %!d(string=hai) anos
pai
achega
66c41e7c45
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 {
 
-using ModuleCallback = Function<void(JavaScriptModuleScript*)>;
+using ModuleCallback = JS::SafeFunction<void(JavaScriptModuleScript*)>;
 
 class DescendantFetchingContext : public RefCounted<DescendantFetchingContext> {
 public: