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

Side by Side Diff: third_party/WebKit/LayoutTests/bindings/location-lifetime.html

Issue 2826393004: v8binding: Makes Location's wrapper objects alive, really. (Closed)
Patch Set: Added a layout test. 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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <iframe id="iframe-for-document.location"></iframe>
5 <iframe id="iframe-for-window.location"></iframe>
6 <script>
7 test(() => {
8 let observation;
9 (function() {
10 let iframe = document.getElementById("iframe-for-document.location");
11 let location = iframe.contentDocument.location;
12 observation = internals.observeGC(location);
13 })();
14 gc();
15 assert_false(observation.wasCollected, "Location wrapper object was collected. ");
16 }, "document.location shouldn't be collected by GC.");
17
18 test(() => {
19 let observation;
20 (function() {
21 let iframe = document.getElementById("iframe-for-window.location");
22 let location = iframe.contentWindow.location;
23 observation = internals.observeGC(location);
24 })();
25 gc();
26 assert_false(observation.wasCollected, "Location wrapper object was collected. ");
27 }, "window.location shouldn't be collected by GC.");
28 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698