Переглянути джерело

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 роки тому
батько
коміт
66c41e7c45
1 змінених файлів з 1 додано та 1 видалено
  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: