Diff
Modified: trunk/LayoutTests/ChangeLog (128262 => 128263)
--- trunk/LayoutTests/ChangeLog 2012-09-12 04:26:15 UTC (rev 128262)
+++ trunk/LayoutTests/ChangeLog 2012-09-12 05:02:48 UTC (rev 128263)
@@ -1,3 +1,17 @@
+2012-09-11 Taiju Tsuiki <t...@chromium.org>
+
+ WebFrameImpl::client() needs NULL check in WebWorkerClientImpl::openFileSystem
+ https://bugs.webkit.org/show_bug.cgi?id=96354
+
+ Reviewed by Kent Tamura.
+
+ Ensure non-NULL before using WebFrameImpl::client().
+
+ * fast/filesystem/workers/detached-frame-crash-expected.txt: Added.
+ * fast/filesystem/workers/detached-frame-crash.html: Added.
+ * fast/filesystem/workers/resources/detached-frame-crash-frame.html: Added.
+ * fast/filesystem/workers/resources/detached-frame-crash-worker.js: Added.
+
2012-09-11 Stephanie Lewis <sle...@apple.com>
Skip spatial-navigation tests on mac-wk2 because they are all failing.
Added: trunk/LayoutTests/fast/filesystem/workers/detached-frame-crash-expected.txt (0 => 128263)
--- trunk/LayoutTests/fast/filesystem/workers/detached-frame-crash-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/filesystem/workers/detached-frame-crash-expected.txt 2012-09-12 05:02:48 UTC (rev 128263)
@@ -0,0 +1 @@
+PASS
Added: trunk/LayoutTests/fast/filesystem/workers/detached-frame-crash.html (0 => 128263)
--- trunk/LayoutTests/fast/filesystem/workers/detached-frame-crash.html (rev 0)
+++ trunk/LayoutTests/fast/filesystem/workers/detached-frame-crash.html 2012-09-12 05:02:48 UTC (rev 128263)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<!-- http://crbug.com/147592
+ http://webkit.org/b/96354 -->
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+document.addEventListener("DOMContentLoaded", runTest);
+
+function runTest()
+{
+ addEventListener("message", clear);
+}
+
+function clear(event)
+{
+ document.body.innerText = "";
+ setTimeout(done, 0);
+}
+
+function done()
+{
+ document.body.innerText = "PASS";
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+</script>
+<iframe id="frame" src=""
Added: trunk/LayoutTests/fast/filesystem/workers/resources/detached-frame-crash-frame.html (0 => 128263)
--- trunk/LayoutTests/fast/filesystem/workers/resources/detached-frame-crash-frame.html (rev 0)
+++ trunk/LayoutTests/fast/filesystem/workers/resources/detached-frame-crash-frame.html 2012-09-12 05:02:48 UTC (rev 128263)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script>
+var worker = new Worker("detached-frame-crash-worker.js");
+worker.addEventListener("message", relayMessage);
+
+function relayMessage(event)
+{
+ parent.postMessage(event.data, location.origin);
+}
+</script>
Added: trunk/LayoutTests/fast/filesystem/workers/resources/detached-frame-crash-worker.js (0 => 128263)
--- trunk/LayoutTests/fast/filesystem/workers/resources/detached-frame-crash-worker.js (rev 0)
+++ trunk/LayoutTests/fast/filesystem/workers/resources/detached-frame-crash-worker.js 2012-09-12 05:02:48 UTC (rev 128263)
@@ -0,0 +1,7 @@
+postMessage("Ready");
+run();
+
+function run()
+{
+ webkitRequestFileSystem(TEMPORARY, 1, run);
+}
Modified: trunk/Source/WebKit/chromium/ChangeLog (128262 => 128263)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-09-12 04:26:15 UTC (rev 128262)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-09-12 05:02:48 UTC (rev 128263)
@@ -1,3 +1,17 @@
+2012-09-11 Taiju Tsuiki <t...@chromium.org>
+
+ WebFrameImpl::client() needs NULL check in WebWorkerClientImpl::openFileSystem
+ https://bugs.webkit.org/show_bug.cgi?id=96354
+
+ Reviewed by Kent Tamura.
+
+ Ensure non-NULL before using WebFrameImpl::client().
+
+ Test: fast/filesystem/workers/detached-frame-crash.html
+
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::openFileSystem):
+
2012-09-11 Keishi Hattori <kei...@webkit.org>
Create Localizer factory method for LocaleICU
Modified: trunk/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp (128262 => 128263)
--- trunk/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp 2012-09-12 04:26:15 UTC (rev 128262)
+++ trunk/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp 2012-09-12 05:02:48 UTC (rev 128263)
@@ -57,6 +57,7 @@
#include "FrameLoaderClientImpl.h"
#include "PlatformMessagePortChannel.h"
+#include "WebFileSystemCallbacks.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
#include "WebMessagePortChannel.h"
@@ -209,7 +210,11 @@
void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long size, bool create,
WebFileSystemCallbacks* callbacks)
{
- m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callbacks);
+ if (!m_webFrame->client()) {
+ callbacks->didFail(WebFileErrorAbort);
+ return;
+ }
+ m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callbacks);
}
bool WebWorkerClientImpl::allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize)