Bug 251684 - [GTK] TestFrame: subframe test has object leak
Summary: [GTK] TestFrame: subframe test has object leak
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Linux
: P2 Normal
Assignee: Przemyslaw Gorszkowski
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-03 06:22 PST by Przemyslaw Gorszkowski
Modified: 2023-02-06 01:25 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Przemyslaw Gorszkowski 2023-02-03 06:22:16 PST
In gtk api tests which can be run:
Tools/Scripts/run-gtk-tests /app/webkit/WebKitBuild/GTK/Release/bin/TestWebKitAPI/WebKitGTK/TestFrame
in test 'subframe' there is information about object leak:

Tools/Scripts/run-gtk-tests /app/webkit/WebKitBuild/GTK/Release/bin/TestWebKitAPI/WebKitGTK/TestFrame
TEST: /app/webkit/WebKitBuild/GTK/Release/bin/TestWebKitAPI/WebKitGTK/TestFrame...
  /webkit/WebKitFrame/main-frame:                                     PASS
GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
Mesa: The provided filesystem timestamp for the cache is bogus! Disabling On-disk cache.
  /webkit/WebKitFrame/uri:                                            PASS
Mesa: The provided filesystem timestamp for the cache is bogus! Disabling On-disk cache.
  /webkit/WebKitFrame/javascript-context:                             PASS
Mesa: The provided filesystem timestamp for the cache is bogus! Disabling On-disk cache.
  /webkit/WebKitFrame/javascript-values:                              PASS
Mesa: The provided filesystem timestamp for the cache is bogus! Disabling On-disk cache.
  /webkit/WebKitFrame/subframe:                                       PASS
Mesa: The provided filesystem timestamp for the cache is bogus! Disabling On-disk cache.
Leaked objects in WebProcess: WebKitWebPage(0x55f0239978a0)
Bail out! ERROR:/app/webkit/Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:49:void checkLeaks(): 's_watchedObjects.isEmpty()' should be TRUE

Ran 6 tests of 6 with 6 successful

What I found is: in case of /webkit/WebKitFrame/subframe the windowObjectClearedCallback from Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp is called two times for the same page and frame and g_object_ref(webPage) is called two times, while g_object_unref(webPage); from webProcessTestRunnerFinalize is called only one, and that is why the page is not destroyed and leak is reported
Comment 1 Przemyslaw Gorszkowski 2023-02-06 00:42:06 PST
Pull request: https://github.com/WebKit/WebKit/pull/9673
Comment 2 EWS 2023-02-06 01:24:47 PST
Committed 259883@main (af3682230d4e): <https://commits.webkit.org/259883@main>

Reviewed commits have been landed. Closing PR #9673 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-02-06 01:25:19 PST
<rdar://problem/105073324>