From 27009bcd4f0d3c6fb5f1324521a353c8fdfd168c Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 9 Jun 2010 11:21:20 +0100 Subject: Cherry-pick WebKit change r60069 to fix a leak in Geolocation This change was made as a fix for Bug https://bugs.webkit.org/show_bug.cgi?id=39288 but was later rolled back in r60441 pending further discussion. We need this fix, so cherry-pick it to Android until https://bugs.webkit.org/show_bug.cgi?id=39288 is fixed properly. Change-Id: Ie5cc610b841798e42ec1232b4af7674ce425b2c4 --- .../fast/dom/Geolocation/ongoing-request-leak-expected.txt | 1 + LayoutTests/fast/dom/Geolocation/ongoing-request-leak.html | 13 +++++++++++++ .../dom/Geolocation/script-tests/ongoing-request-leak.js | 13 +++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 LayoutTests/fast/dom/Geolocation/ongoing-request-leak-expected.txt create mode 100644 LayoutTests/fast/dom/Geolocation/ongoing-request-leak.html create mode 100644 LayoutTests/fast/dom/Geolocation/script-tests/ongoing-request-leak.js (limited to 'LayoutTests/fast') diff --git a/LayoutTests/fast/dom/Geolocation/ongoing-request-leak-expected.txt b/LayoutTests/fast/dom/Geolocation/ongoing-request-leak-expected.txt new file mode 100644 index 0000000..3fb979f --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/ongoing-request-leak-expected.txt @@ -0,0 +1 @@ +Exercises a condition where the DOMWindow may leak if Geolocation requests are ongoing when the page is navigated away or closed. Complete. diff --git a/LayoutTests/fast/dom/Geolocation/ongoing-request-leak.html b/LayoutTests/fast/dom/Geolocation/ongoing-request-leak.html new file mode 100644 index 0000000..dab385e --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/ongoing-request-leak.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/ongoing-request-leak.js b/LayoutTests/fast/dom/Geolocation/script-tests/ongoing-request-leak.js new file mode 100644 index 0000000..08e6b21 --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/script-tests/ongoing-request-leak.js @@ -0,0 +1,13 @@ +description("Exercises a condition where the DOMWindow may leak if Geolocation requests are ongoing when the page is navigated away or closed. The page should reoload."); + +if (window.layoutTestController) layoutTestController.setGeolocationPermission(true); +if (window.layoutTestController) layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100.0); + +navigator.geolocation.watchPosition(function() {}, null); + +document.body.onload = function() { + location = "data:text/html,Exercises a condition where the DOMWindow may leak if Geolocation requests are ongoing when the page is navigated away or closed. Complete.