Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 449035bdfe62c6434ed30eb8df64ecd92f1b76f0
      
https://github.com/WebKit/WebKit/commit/449035bdfe62c6434ed30eb8df64ecd92f1b76f0
  Author: Michael Catanzaro <[email protected]>
  Date:   2026-06-22 (Mon, 22 Jun 2026)

  Changed paths:
    M Source/WebKit/Shared/glib/JavaScriptEvaluationResultGLib.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp

  Log Message:
  -----------
  [WPE][GTK] Fix leaks when using g_variant_iter_loop()
https://bugs.webkit.org/show_bug.cgi?id=298066

Reviewed by Patrick Griffis.

Milan pointed out that if we break out of a g_variant_iter_loop() loop,
then it cannot free the key or value for us. In these cases, we have to
free it manually.

The easiest solution is to just not use g_variant_iter_loop() in these
cases, to ensure we cannot mess up. g_variant_iter_next() is basically
the same thing, except it requires that we handle the ownership.

* Source/WebKit/Shared/glib/JavaScriptEvaluationResultGLib.cpp:
(WebKit::JavaScriptEvaluationResult::GLibExtractor::toValue):
(WebKit::isSerializable):
* Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:
(parseAsyncFunctionArguments):

Canonical link: https://commits.webkit.org/315630@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to