<?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>243123</bug_id>
          
          <creation_ts>2022-07-22 17:28:47 -0700</creation_ts>
          <short_desc>Thousands of window.onload events makes Safari hang and page loading slower than other browsers</short_desc>
          <delta_ts>2022-10-18 08:30:54 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>Safari 15</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=244154</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=188499</see_also>
          <bug_file_loc>https://bug1542995.bmoattachments.org/attachment.cgi?id=9056867</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>karlcow</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1886145</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-22 17:28:47 -0700</bug_when>
    <thetext>Hi Team,

Thanks for doing good job, while trying to find how other browsers work for window.onload, I came across following test case in Mozilla Bugzilla:

Link - https://bug1542995.bmoattachments.org/attachment.cgi?id=9056867

It causes Safari tab to hang and also it makes interacting with other tabs bit difficult for few seconds and then it also take longer than other browsers (Chrome Canary 105 and Firefox Nightly 104) to load it.

** Steps to Reproduce ***

1. Load Link
2. Notice the page loading speed

EXPECTED RESULT: Page Loading should not be slower than other browsers and it should not hang Safari even in slightest

ACTUAL RESULT: Page Loading is slower and it do hang Safari on few occasion but it does not lead to crash

Looking forward for this bug to get fixed.

Thanks in advance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886483</commentid>
    <comment_count>1</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-07-25 00:18:50 -0700</bug_when>
    <thetext>Oh this is a bug I have created on Firefox, which came from a Webcompat issue.
https://bugzilla.mozilla.org/show_bug.cgi?id=1542995 (which should be closed probably)

The bug is based on a recursion limit.

On Firefox windows, the issue was fixed with a stack limit.
https://hg.mozilla.org/releases/mozilla-release/rev/c6f45f6f744d

And this one fixed it for other platforms.
https://bugzilla.mozilla.org/show_bug.cgi?id=1578350</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886484</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-25 00:20:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/97536058&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>