Index: LayoutTests/media/video-test.js |
diff --git a/LayoutTests/media/video-test.js b/LayoutTests/media/video-test.js |
index e558c1db9a90094ddbfc71a27856c090e750edfb..a0e29d696b620b39832708703927307a7829c97b 100644 |
--- a/LayoutTests/media/video-test.js |
+++ b/LayoutTests/media/video-test.js |
@@ -364,3 +364,18 @@ function waitForEventsAndCall(eventList, func) |
eventList[i][0].addEventListener(requiredEvents[i], _eventCallback, true); |
} |
} |
+ |
+function forceGC() |
+{ |
+ // Available in content_tests |
+ if (window.GCController) |
+ return GCController.collect(); |
+ |
+ // Available if '--js-flags="--expose_gc"' specified |
+ if (typeof gc == 'function') |
+ return gc(); |
+ |
+ // Force garbage collection |
+ for (var ndx = 0; ndx < 99000; ndx++) |
+ var str = new String("1234"); |
+} |