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

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/cursor-leak.html

Issue 1999013002: Modify some gc related layout tests to work with Ignition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed more comments. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/netinfo/gc-unused-listeners.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/storage/indexeddb/cursor-leak.html
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-leak.html b/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-leak.html
index 6fbda670510d9e452212b566256119c293bd8e87..4c64e34962a2f5edc9f344ca8beec56bcfb32f44 100644
--- a/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-leak.html
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-leak.html
@@ -32,19 +32,19 @@ function onOpen(evt)
};
tx.oncomplete = function() {
db.close();
-
- // Try and induce a leak by a reference cycle from DOM to V8 and back.
- // If the v8 value of cursor.key (etc) is only held by the cursor's
- // V8 wrapper then there will be no leak.
- cursor.key.cursor = cursor;
- cursor.primaryKey.cursor = cursor;
- cursor.value.cursor = cursor;
-
- // Do not pass the object directly to observeGC function. This may
- // remain live on this function's stack preventing GC from collecting
- // it. Accessing the object inside an inner function will prevent any
- // unneeded references on this function's stack.
- cursorObserver = internals.observeGC((() => {return cursor;})());
+
+ // Do initialization work in an inner function to avoid references to
+ // objects remaining live on this function's stack frame
+ // (http://crbug.com/595672/).
+ (function() {
+ // Try and induce a leak by a reference cycle from DOM to V8 and
+ // back. If the v8 value of cursor.key (etc) is only held by the
+ // cursor's V8 wrapper then there will be no leak.
+ cursor.key.cursor = cursor;
+ cursor.primaryKey.cursor = cursor;
+ cursor.value.cursor = cursor;
+ cursorObserver = internals.observeGC(cursor);
+ })();
cursorRequest = null;
cursor = null;
« no previous file with comments | « third_party/WebKit/LayoutTests/netinfo/gc-unused-listeners.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698