Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: third_party/WebKit/LayoutTests/storage/indexeddb/key-cursor-request-cycle.html

Issue 2813873002: Modify some more GC layout tests to work with Ignition (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/storage/indexeddb/cursor-request-cycle.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script> 2 <script src="../../resources/js-test.js"></script>
3 <script src="resources/shared.js"></script> 3 <script src="resources/shared.js"></script>
4 <script> 4 <script>
5 5
6 description("Verify that that key cursors weakly hold request, and work if reque st is GC'd"); 6 description("Verify that that key cursors weakly hold request, and work if reque st is GC'd");
7 7
8 indexedDBTest(prepareDatabase, onOpen); 8 indexedDBTest(prepareDatabase, onOpen);
9 9
10 function prepareDatabase(evt) 10 function prepareDatabase(evt)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 cursorObservation = internals.observeGC(cursor); 63 cursorObservation = internals.observeGC(cursor);
64 evalAndLog("cursor = null"); 64 evalAndLog("cursor = null");
65 evalAndLog("gc()"); 65 evalAndLog("gc()");
66 shouldBeFalse("cursorObservation.wasCollected"); 66 shouldBeFalse("cursorObservation.wasCollected");
67 67
68 evalAndLog("finalRequest = store.get(0)"); 68 evalAndLog("finalRequest = store.get(0)");
69 finalRequest.onsuccess = function finalRequestSuccess(evt) { 69 finalRequest.onsuccess = function finalRequestSuccess(evt) {
70 preamble(evt); 70 preamble(evt);
71 shouldBeEqualToString("cursor.key", "key2"); 71 shouldBeEqualToString("cursor.key", "key2");
72 72
73 cursorObservation = internals.observeGC(cursor); 73 // Access objects in an inner function to avoid references to
74 // objects remaining live on this function's stack frame
75 // (http://crbug.com/595672/).
76 (() => { cursorObservation = internals.observeGC(cursor); })();
74 evalAndLog("cursor = null"); 77 evalAndLog("cursor = null");
75 evalAndLog("gc()"); 78 evalAndLog("gc()");
76 shouldBeTrue("cursorRequestObservation.wasCollected"); 79 shouldBeTrue("cursorRequestObservation.wasCollected");
77 shouldBeTrue("cursorObservation.wasCollected"); 80 shouldBeTrue("cursorObservation.wasCollected");
78 }; 81 };
79 }; 82 };
80 83
81 tx.oncomplete = finishJSTest; 84 tx.oncomplete = finishJSTest;
82 } 85 }
83 86
84 87
85 </script> 88 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/storage/indexeddb/cursor-request-cycle.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698