[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
kinuko at chromium.org
kinuko at chromium.org
Wed Dec 22 13:40:24 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f0673b2295f85815d9d65ca05e78dfe1915731a8
Author: kinuko at chromium.org <kinuko at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 23 00:58:53 2010 +0000
2010-09-22 Kinuko Yasuda <kinuko at chromium.org>
Reviewed by Dumitru Daniliuc.
[FileSystem] Fix Flags handling in DirectoryEntry custom binding code
https://bugs.webkit.org/show_bug.cgi?id=46028
Do not use adoptRef to get RefPtr from a raw pointer that is already
adopted in toNative/toJS.
Test: fast/filesystem/flags-passing.html
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/v8/custom/V8DirectoryEntryCustom.cpp:
(WebCore::V8DirectoryEntry::getDirectoryCallback):
(WebCore::V8DirectoryEntry::getFileCallback):
2010-09-22 Kinuko Yasuda <kinuko at chromium.org>
Reviewed by Dumitru Daniliuc.
[FileSystem] Fix Flags handling in DirectoryEntry custom binding code
https://bugs.webkit.org/show_bug.cgi?id=46028
* fast/filesystem/flags-passing-expected.txt: Added.
* fast/filesystem/flags-passing.html: Added.
* fast/filesystem/script-tests/TEMPLATE.html: Added.
* fast/filesystem/script-tests/flags-passing.js: Added.
* platform/gtk/Skipped: FileSystem API not supported on gtk.
* platform/mac/Skipped: FileSystem API not supported on mac.
* platform/qt/Skipped: FileSystem API not supported on qt.
* platform/win/Skipped: FileSystem API not supported on win.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 251031c..24fc53d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-22 Kinuko Yasuda <kinuko at chromium.org>
+
+ Reviewed by Dumitru Daniliuc.
+
+ [FileSystem] Fix Flags handling in DirectoryEntry custom binding code
+ https://bugs.webkit.org/show_bug.cgi?id=46028
+
+ * fast/filesystem/flags-passing-expected.txt: Added.
+ * fast/filesystem/flags-passing.html: Added.
+ * fast/filesystem/script-tests/TEMPLATE.html: Added.
+ * fast/filesystem/script-tests/flags-passing.js: Added.
+ * platform/gtk/Skipped: FileSystem API not supported on gtk.
+ * platform/mac/Skipped: FileSystem API not supported on mac.
+ * platform/qt/Skipped: FileSystem API not supported on qt.
+ * platform/win/Skipped: FileSystem API not supported on win.
+
2010-09-22 Tony Chang <tony at chromium.org>
Reviewed by David Levin.
diff --git a/LayoutTests/fast/filesystem/flags-passing-expected.txt b/LayoutTests/fast/filesystem/flags-passing-expected.txt
new file mode 100644
index 0000000..330c83f
--- /dev/null
+++ b/LayoutTests/fast/filesystem/flags-passing-expected.txt
@@ -0,0 +1,17 @@
+Passing Flags parameter tests. This test checks if passing Flags parameters (in Object format or in JSON format) to DirectoryEntry.getFile does not crash and works as expected.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+* Passing a Flags object.
+* Recycling the same Flags object.
+* Passing a Flags object (with exclusive=true).
+* Passing JSON Flags object.
+* Passing JSON Flags object (with exclusive=true).
+Finished running tests.
+PASS expectedCallbacksCount is 3
+PASS unexpectedCallbacksCount is 0
+
diff --git a/LayoutTests/fast/filesystem/flags-passing.html b/LayoutTests/fast/filesystem/flags-passing.html
new file mode 100644
index 0000000..70add66
--- /dev/null
+++ b/LayoutTests/fast/filesystem/flags-passing.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/flags-passing.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/script-tests/TEMPLATE.html b/LayoutTests/fast/filesystem/script-tests/TEMPLATE.html
new file mode 100644
index 0000000..8a1a15e
--- /dev/null
+++ b/LayoutTests/fast/filesystem/script-tests/TEMPLATE.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/script-tests/flags-passing.js b/LayoutTests/fast/filesystem/script-tests/flags-passing.js
new file mode 100644
index 0000000..4b27229
--- /dev/null
+++ b/LayoutTests/fast/filesystem/script-tests/flags-passing.js
@@ -0,0 +1,103 @@
+description("Passing Flags parameter tests. This test checks if passing Flags parameters (in Object format or in JSON format) to DirectoryEntry.getFile does not crash and works as expected.");
+
+var testFileName = '/non_existent_file';
+var fileSystem = null;
+var expectedCallbacksCount = 0;
+var unexpectedCallbacksCount = 0;
+var expected = function(e) { expectedCallbacksCount++; };
+var unexpected = function(e) { unexpectedCallbacksCount++; };
+
+var testsList = [
+ 'runObjectTest',
+ 'runObjectTestWithExclusive',
+ 'cleanupAndRunNext',
+ 'runJSONTest',
+ 'runJSONTestWithExclusive'
+];
+var testCounter = 0;
+
+function endTest() {
+ debug("Finished running tests.");
+ shouldBe('expectedCallbacksCount', '3');
+ shouldBe('unexpectedCallbacksCount', '0');
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+
+function runNextTest(v) {
+ if (testCounter == testsList.length)
+ endTest();
+ else
+ this[testsList[testCounter++]]();
+}
+
+function errorCallback(error) {
+ debug("Error occured during requesting Temporary FileSystem:" + error.code);
+
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+
+// Test body functions ----------------------------------------------------
+function runObjectTest(v) {
+ debug("* Passing a Flags object.");
+ var flags = new Flags();
+ flags.create = false;
+
+ fileSystem.root.getFile(testFileName, flags, unexpected, expected);
+
+ debug("* Recycling the same Flags object.");
+
+ fileSystem.root.getFile(testFileName, flags, unexpected, expected);
+
+ flags.create = true;
+ fileSystem.root.getFile(testFileName, flags, runNextTest, errorCallback);
+}
+
+function runObjectTestWithExclusive(v) {
+ debug("* Passing a Flags object (with exclusive=true).");
+ var flags = new Flags;
+ flags.create = true;
+ flags.exclusive = true;
+
+ // This should fail.
+ fileSystem.root.getFile(testFileName, flags, errorCallback, runNextTest);
+}
+
+function runJSONTest(v) {
+ debug("* Passing JSON Flags object.");
+
+ fileSystem.root.getFile(testFileName, {create:false}, unexpected, expected);
+ fileSystem.root.getFile(testFileName, {create:true}, runNextTest, errorCallback);
+}
+
+function runJSONTestWithExclusive(v) {
+ debug("* Passing JSON Flags object (with exclusive=true).");
+
+ // This should fail.
+ fileSystem.root.getFile(testFileName, {create:true, exclusive:true}, errorCallback, runNextTest);
+}
+
+// End of test body functions ---------------------------------------------
+
+function cleanupAndRunNext(v) {
+ fileSystem.root.getFile(testFileName, {create:false}, function(entry) {
+ // Remove the entry before start testing.
+ entry.remove(runNextTest, errorCallback);
+ }, runNextTest);
+}
+
+function fileSystemCallback(fs) {
+ fileSystem = fs;
+ cleanupAndRunNext();
+}
+
+if (window.requestFileSystem) {
+ if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+ requestFileSystem(window.TEMPORARY, 100, fileSystemCallback, errorCallback);
+} else
+ debug("This test requires FileSystem API support.");
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index d3ba642..68c6bb6 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5929,3 +5929,6 @@ fast/parser/pre-html5-parser-quirks.html
# https://bugs.webkit.org/show_bug.cgi?id=46169
media/video-controls-with-mutation-event-handler.html
+
+# FileSystem API is not supported.
+fast/filesystem
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index b4111ae..420790c 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -314,3 +314,6 @@ fast/viewport
# needs enhanced eventSender.contextMenu() return value
# see also https://bugs.webkit.org/show_bug.cgi?id=45021
media/context-menu-actions.html
+
+# FileSystem API is not supported.
+fast/filesystem
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 1fd47a0..1fbd2ac 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5481,3 +5481,5 @@ http/tests/uri/css-href.php
# Pre-HMTL5 parser quirks only apply to the mac port for now.
fast/parser/pre-html5-parser-quirks.html
+# FileSystem API is not supported.
+fast/filesystem
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 10a8f36..7f5c987 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -1004,3 +1004,5 @@ http/tests/media/video-served-as-text.html
# Pre-HMTL5 parser quirks only apply to the mac port for now.
fast/parser/pre-html5-parser-quirks.html
+# FileSystem API is not supported.
+fast/filesystem
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a729781..b85d142 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-22 Kinuko Yasuda <kinuko at chromium.org>
+
+ Reviewed by Dumitru Daniliuc.
+
+ [FileSystem] Fix Flags handling in DirectoryEntry custom binding code
+ https://bugs.webkit.org/show_bug.cgi?id=46028
+
+ Do not use adoptRef to get RefPtr from a raw pointer that is already
+ adopted in toNative/toJS.
+
+ Test: fast/filesystem/flags-passing.html
+
+ * bindings/js/JSDirectoryEntryCustom.cpp:
+ (WebCore::JSDirectoryEntry::getFile):
+ (WebCore::JSDirectoryEntry::getDirectory):
+ * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
+ (WebCore::V8DirectoryEntry::getDirectoryCallback):
+ (WebCore::V8DirectoryEntry::getFileCallback):
+
2010-09-22 Jia Pu <jpu at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebCore/bindings/js/JSDirectoryEntryCustom.cpp b/WebCore/bindings/js/JSDirectoryEntryCustom.cpp
index 35a6c32..a0e0455 100644
--- a/WebCore/bindings/js/JSDirectoryEntryCustom.cpp
+++ b/WebCore/bindings/js/JSDirectoryEntryCustom.cpp
@@ -66,7 +66,7 @@ JSValue JSDirectoryEntry::getFile(ExecState* exec)
JSValue jsExclusive = object->get(exec, Identifier(exec, "exclusive"));
flags->setExclusive(jsExclusive.toBoolean(exec));
} else
- flags = adoptRef(toFlags(exec->argument(1)));
+ flags = toFlags(exec->argument(1));
if (exec->hadException())
return jsUndefined();
RefPtr<EntryCallback> successCallback;
@@ -112,7 +112,7 @@ JSValue JSDirectoryEntry::getDirectory(ExecState* exec)
JSValue jsExclusive = object->get(exec, Identifier(exec, "exclusive"));
flags->setExclusive(jsExclusive.toBoolean(exec));
} else
- flags = adoptRef(toFlags(exec->argument(1)));
+ flags = toFlags(exec->argument(1));
if (exec->hadException())
return jsUndefined();
RefPtr<EntryCallback> successCallback;
diff --git a/WebCore/bindings/v8/custom/V8DirectoryEntryCustom.cpp b/WebCore/bindings/v8/custom/V8DirectoryEntryCustom.cpp
index 286b154..fc8cf98 100644
--- a/WebCore/bindings/v8/custom/V8DirectoryEntryCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DirectoryEntryCustom.cpp
@@ -71,7 +71,7 @@ v8::Handle<v8::Value> V8DirectoryEntry::getDirectoryCallback(const v8::Arguments
}
} else {
EXCEPTION_BLOCK(Flags*, tmp_flags, V8Flags::HasInstance(args[1]) ? V8Flags::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0);
- flags = adoptRef(tmp_flags);
+ flags = tmp_flags;
}
RefPtr<EntryCallback> successCallback;
if (args.Length() > 2 && !args[2]->IsNull() && !args[2]->IsUndefined()) {
@@ -114,7 +114,7 @@ v8::Handle<v8::Value> V8DirectoryEntry::getFileCallback(const v8::Arguments& arg
}
} else {
EXCEPTION_BLOCK(Flags*, tmp_flags, V8Flags::HasInstance(args[1]) ? V8Flags::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0);
- flags = adoptRef(tmp_flags);
+ flags = tmp_flags;
}
RefPtr<EntryCallback> successCallback;
if (args.Length() > 2 && !args[2]->IsNull() && !args[2]->IsUndefined()) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list