<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>245324</bug_id>
          
          <creation_ts>2022-09-17 15:13:10 -0700</creation_ts>
          <short_desc>[GTK] http/tests/notifications/notification.html is crashing when notification permission is granted</short_desc>
          <delta_ts>2026-02-16 04:01:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=245294</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Dumez">cdumez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>fujii</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1899248</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2022-09-17 15:13:10 -0700</bug_when>
    <thetext>http/tests/notifications/notification.html is crashing when notification permission is granted:
Thread 1 (Thread 0x7f8531f9b9c0 (LWP 67318)):
#0  0x00007f853b26c440 in WebKit::ShareableBitmap::data() const () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#1  0x00007f853b2d2f13 in WebKit::ShareableBitmap::createGraphicsContext() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#2  0x00007f853b27b2c1 in IPC::encodeImage(IPC::Encoder&amp;, WebCore::Image&amp;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#3  0x00007f853b67d2af in unsigned long IPC::Connection::sendWithAsyncReply&lt;Messages::NotificationManagerMessageHandler::ShowNotification, WTF::CompletionHandler&lt;void ()&gt; &gt;(Messages::NotificationManagerMessageHandler::ShowNotification&amp;&amp;, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;, unsigned long, WTF::OptionSet&lt;IPC::SendOption&gt;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#4  0x00007f853b67d3ad in WTF::Detail::CallableWrapper&lt;WebKit::WebNotificationManager::sendNotificationMessageWithAsyncReply&lt;Messages::NotificationManagerMessageHandler::ShowNotification&gt;(Messages::NotificationManagerMessageHandler::ShowNotification&amp;&amp;, WebCore::Notification&amp;, WebKit::WebPage*, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;)::{lambda(auto:1&amp;, auto:2)#1}, bool, IPC::Connection&amp;, unsigned long&gt;::call(IPC::Connection&amp;, unsigned long) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#5  0x00007f853b676b5c in WebKit::WebNotificationManager::show(WebCore::Notification&amp;, WebKit::WebPage*, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#6  0x00007f853b6bf2ef in WTF::Detail::CallableWrapper&lt;WebKit::WebNotificationClient::show(WebCore::Notification&amp;, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;)::{lambda()#1}, void&gt;::call() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#7  0x00007f85388d040b in WTF::callOnMainRunLoopAndWait(WTF::Function&lt;void ()&gt;&amp;&amp;) () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0
#8  0x00007f853b6c6d51 in WebKit::WebNotificationClient::show(WebCore::Notification&amp;, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#9  0x00007f853c561460 in WTF::Detail::CallableWrapper&lt;WebCore::Notification::show(WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;)::{lambda(WTF::RefPtr&lt;WebCore::NotificationResources, WTF::RawPtrTraits&lt;WebCore::NotificationResources&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::NotificationResources&gt; &gt;&amp;&amp;)#1}, void, WTF::RefPtr&lt;WebCore::NotificationResources, WTF::RawPtrTraits&lt;WebCore::NotificationResources&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::NotificationResources&gt; &gt;&amp;&amp;&gt;::call(WTF::RefPtr&lt;WebCore::NotificationResources, WTF::RawPtrTraits&lt;WebCore::NotificationResources&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::NotificationResources&gt; &gt;&amp;&amp;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#10 0x00007f853c56392f in WebCore::NotificationResourcesLoader::didFinishLoadingResource(WebCore::NotificationResourcesLoader::ResourceLoader*) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#11 0x00007f853c563f12 in WebCore::NotificationResourcesLoader::ResourceLoader::didFinishLoading(WTF::ObjectIdentifier&lt;WebCore::ResourceLoader&gt;, WebCore::NetworkLoadMetrics const&amp;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#12 0x00007f853d1d4cc5 in WebCore::CachedResource::checkNotify(WebCore::NetworkLoadMetrics const&amp;) [clone .part.0] () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#13 0x00007f853d1d59dc in WebCore::CachedRawResource::finishLoading(WebCore::FragmentedSharedBuffer const*, WebCore::NetworkLoadMetrics const&amp;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#14 0x00007f853d193b03 in WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&amp;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#15 0x00007f853b01f233 in void IPC::handleMessage&lt;Messages::WebResourceLoader::DidFinishResourceLoad, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics&amp;&amp;)&gt;(IPC::Connection&amp;, IPC::Decoder&amp;, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics&amp;&amp;)) [clone .isra.0] () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#16 0x00007f853b0230fc in WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&amp;, IPC::Decoder&amp;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#17 0x00007f853b24bda5 in IPC::Connection::dispatchMessage(std::unique_ptr&lt;IPC::Decoder, std::default_delete&lt;IPC::Decoder&gt; &gt;) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#18 0x00007f853b24da81 in IPC::Connection::dispatchOneIncomingMessage() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#19 0x00007f85388e07bc in WTF::RunLoop::performWork() () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0
#20 0x00007f8538957329 in WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*) () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0
#21 0x00007f8538957dbf in WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::_FUN(_GSource*, int (*)(void*), void*) () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0
#22 0x00007f8534b3c294 in g_main_dispatch (context=0x564f41126240) at ../glib/gmain.c:3381
#23 g_main_context_dispatch (context=0x564f41126240) at ../glib/gmain.c:4099
#24 0x00007f8534b3c638 in g_main_context_iterate (context=0x564f41126240, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at ../glib/gmain.c:4175
#25 0x00007f8534b3c943 in g_main_loop_run (loop=0x564f41081340) at ../glib/gmain.c:4373
#26 0x00007f8538957f00 in WTF::RunLoop::run() () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0
#27 0x00007f853b73f5ce in int WebKit::AuxiliaryProcessMain&lt;WebKit::WebProcessMainGtk&gt;(int, char**) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#28 0x00007f8534482b80 in __libc_start_main (main=0x564f403b0970 &lt;main&gt;, argc=4, argv=0x7ffc97fa8d08, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7ffc97fa8cf8) at ../csu/libc-start.c:332
#29 0x0000564f403b08ae in _start () at ../sysdeps/x86_64/start.S:120</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899250</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-09-17 15:23:56 -0700</bug_when>
    <thetext>Likely related to 253460@main</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899251</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2022-09-17 15:26:55 -0700</bug_when>
    <thetext>You need to call `testRunner.grantWebNotificationPermission(self.origin);` at the beginning of the test to trigger this.

I am adding `testRunner.grantWebNotificationPermission(self.origin);` to testharnessreport.js in my patch and I am pretty sure this is what introduced the crashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2182004</commentid>
    <comment_count>3</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2026-02-15 21:45:00 -0800</bug_when>
    <thetext>notification icon is supported only by GTK and WPE.
https://github.com/WebKit/WebKit/blob/4865155d2fcb7cf39aad87597da8f29909d9b7f7/Source/WebCore/Modules/notifications/NotificationResourcesLoader.cpp#L58-L63</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2182008</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2026-02-15 21:59:35 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/58777</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2182042</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-02-16 04:01:49 -0800</bug_when>
    <thetext>Committed 307641@main (72107dcb881e): &lt;https://commits.webkit.org/307641@main&gt;

Reviewed commits have been landed. Closing PR #58777 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>