Changeset 290900 in webkit
- Timestamp:
- Mar 7, 2022, 11:27:00 AM (3 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r290899 r290900 1 2022-03-07 Kimmo Kinnunen <kkinnunen@apple.com> 2 3 LayoutTests/webgl/max-active-contexts-gc.html is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=237466 5 6 Reviewed by Alexey Proskuryakov. 7 The test: 8 - created 16 WebGL contexts 9 - unreferenced 8 WebGL contexts. 10 - forced gc 11 - added 9 WebGL contexts. 12 The test tries to test that GC removes unreferenced contexts. 13 To assert this, it ends up with 17 contexts, which is 1 above 14 the maximum active limit. This means one context is lost and the 15 implementation prints one line of error. 16 17 Since the GC is not exact, sometimes it would only collect 7 of the 8 18 unreferenced contexts. This would mean two error messages. 19 20 Fix by trying to collect each time a context is unreferenced. This seems to be 21 more predictable. 22 23 * webgl/max-active-contexts-gc.html: 24 1 25 2022-03-07 Chris Dumez <cdumez@apple.com> 2 26 -
trunk/LayoutTests/webgl/max-active-contexts-gc.html
r199819 r290900 1 1 <script> 2 function forceGC() { 2 function collect() { 3 if (window.GCController) { 4 GCController.collect(); 5 return; 6 } 3 7 try { 4 8 for (var ndx = 0; ndx < 99000; ndx++) … … 25 29 26 30 // Now remove some of those contexts from this array so they may be garbage collected. 27 while (contexts.length > contextsToKeep) 31 while (contexts.length > contextsToKeep) { 28 32 contexts.shift(); 33 collect(); 34 } 29 35 36 // Add contexts until we get to the limit then add one more. This should only 37 // produce a single warning that an older context will be lost. 30 38 setTimeout(function() { 31 if (window.GCController) 32 GCController.collect(); 33 else 34 forceGC(); 35 36 // Add contexts until we get to the limit then add one more. This should only 37 // produce a single warning that an older context will be lost. 38 setTimeout(function() { 39 while (contexts.length < maxNumberOfActiveContexts + 1) 40 addContext(); 41 42 if (window.testRunner) 43 testRunner.notifyDone(); 44 }); 39 while (contexts.length < maxNumberOfActiveContexts + 1) 40 addContext(); 41 if (window.testRunner) 42 testRunner.notifyDone(); 45 43 }); 46 44
Note:
See TracChangeset
for help on using the changeset viewer.