[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
japhet at chromium.org
japhet at chromium.org
Sun Feb 20 23:30:17 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 2aa1491b1497610c09d351b7d2056f8bcdb6ecd7
Author: japhet at chromium.org <japhet at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 21 00:05:35 2011 +0000
2011-01-20 Nate Chapin <japhet at chromium.org>
Reviewed by Adam Barth.
Test for https://bugs.webkit.org/show_bug.cgi?id=52769.
* fast/dom/Window/Location/resources/set-location-after-close-new-window.html: Added.
* fast/dom/Window/Location/set-location-after-close-expected.txt: Added.
* fast/dom/Window/Location/set-location-after-close.html: Added.
2011-01-20 Nate Chapin <japhet at chromium.org>
Reviewed by Adam Barth.
Null-check m_frame in DOMWindow::setLocation(), since it's
possible to reach this point without it having been checked
already.
https://bugs.webkit.org/show_bug.cgi?id=52769
Test: fast/dom/Window/Location/set-location-after-close.html
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setLocation):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 67d539c..2d28345 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-20 Nate Chapin <japhet at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Test for https://bugs.webkit.org/show_bug.cgi?id=52769.
+
+ * fast/dom/Window/Location/resources/set-location-after-close-new-window.html: Added.
+ * fast/dom/Window/Location/set-location-after-close-expected.txt: Added.
+ * fast/dom/Window/Location/set-location-after-close.html: Added.
+
2011-01-20 Chang Shu <chang.shu at nokia.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/dom/Window/Location/resources/set-location-after-close-new-window.html b/LayoutTests/fast/dom/Window/Location/resources/set-location-after-close-new-window.html
new file mode 100644
index 0000000..9d25380
--- /dev/null
+++ b/LayoutTests/fast/dom/Window/Location/resources/set-location-after-close-new-window.html
@@ -0,0 +1,7 @@
+<html>
+<body onunload="opener.postMessage('closed', '*');">
+<script>
+opener.postMessage("opened", "*");
+</script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/Window/Location/set-location-after-close-expected.txt b/LayoutTests/fast/dom/Window/Location/set-location-after-close-expected.txt
new file mode 100644
index 0000000..940180e
--- /dev/null
+++ b/LayoutTests/fast/dom/Window/Location/set-location-after-close-expected.txt
@@ -0,0 +1,2 @@
+main frame - has 1 onunload handler(s)
+This tests opens a new window, sets a timeout to close it, then sets a timeout to navigate it via window.location. We pass if we don't crash when setting the location of the already closed window.
diff --git a/LayoutTests/fast/dom/Window/Location/set-location-after-close.html b/LayoutTests/fast/dom/Window/Location/set-location-after-close.html
new file mode 100644
index 0000000..d8ecced
--- /dev/null
+++ b/LayoutTests/fast/dom/Window/Location/set-location-after-close.html
@@ -0,0 +1,27 @@
+<html>
+<body>
+This tests opens a new window, sets a timeout to close it, then sets a timeout to navigate it via window.location.
+We pass if we don't crash when setting the location of the already closed window.
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.setCanOpenWindows();
+ layoutTestController.waitUntilDone();
+}
+
+var w = window.open('resources/set-location-after-close-new-window.html');
+
+window.addEventListener("message", processMessage, false);
+
+function processMessage(event) {
+ if (event.data == "opened")
+ w.close();
+ else if (event.data == "closed") {
+ w.location = '';
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+}
+</script>
+</body>
+</html>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 60c7c97..19a4e6e 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-20 Nate Chapin <japhet at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Null-check m_frame in DOMWindow::setLocation(), since it's
+ possible to reach this point without it having been checked
+ already.
+ https://bugs.webkit.org/show_bug.cgi?id=52769
+
+ Test: fast/dom/Window/Location/set-location-after-close.html
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::setLocation):
+
2011-01-20 Chang Shu <chang.shu at nokia.com>
Reviewed by Darin Adler.
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index f6ba6c9..4ca16d0 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -1617,6 +1617,9 @@ EventTargetData* DOMWindow::ensureEventTargetData()
void DOMWindow::setLocation(const String& urlString, DOMWindow* activeWindow, DOMWindow* firstWindow, SetLocationLocking locking)
{
+ if (!m_frame)
+ return;
+
Frame* activeFrame = activeWindow->frame();
if (!activeFrame)
return;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list