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

Side by Side Diff: LayoutTests/plugins/npruntime/script-tests/browser-object-identity.js

Issue 211933008: Remove multiple GC calls and replace GCController.collect calls with GCController.collectAll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert change to worker-event-listener Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 description("Test that plug-in doesn't get a new browser object instance each ti me") 1 description("Test that plug-in doesn't get a new browser object instance each ti me")
2 2
3 function gc() 3 function gc()
4 { 4 {
5 if (window.GCController) 5 if (window.GCController)
6 return GCController.collect(); 6 return GCController.collectAll();
7 7
8 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect) 8 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
9 var s = new String("abc"); 9 var s = new String("abc");
10 } 10 }
11 } 11 }
12 12
13 embed = document.createElement("embed"); 13 embed = document.createElement("embed");
14 embed.type = "application/x-webkit-test-netscape"; 14 embed.type = "application/x-webkit-test-netscape";
15 document.body.appendChild(embed); 15 document.body.appendChild(embed);
16 16
(...skipping 12 matching lines...) Expand all
29 shouldBe("embed.refCount(obj)", "2"); 29 shouldBe("embed.refCount(obj)", "2");
30 shouldBe("embed.getRememberedObject()", "obj"); 30 shouldBe("embed.getRememberedObject()", "obj");
31 shouldBe("embed.getRememberedObject()", "obj"); 31 shouldBe("embed.getRememberedObject()", "obj");
32 shouldBe("embed.refCount(obj)", "2"); 32 shouldBe("embed.refCount(obj)", "2");
33 shouldBe("embed.getAndForgetRememberedObject()", "obj"); 33 shouldBe("embed.getAndForgetRememberedObject()", "obj");
34 shouldBe("embed.refCount(obj)", "1"); 34 shouldBe("embed.refCount(obj)", "1");
35 obj = null; 35 obj = null;
36 gc(); 36 gc();
37 37
38 var successfullyParsed = true; 38 var successfullyParsed = true;
OLDNEW
« no previous file with comments | « LayoutTests/plugins/npruntime/leak-window-scriptable-object.html ('k') | LayoutTests/plugins/refcount-leaks.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698