Changeset 57704 in webkit
- Timestamp:
- Apr 15, 2010 6:17:20 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57697 r57704 1 2010-04-15 Dmitry Titov <dimich@chromium.org> 2 3 Unreviewed, rolling out r57688. 4 http://trac.webkit.org/changeset/57688 5 https://bugs.webkit.org/show_bug.cgi?id=34992 6 7 Makes fast/workers/dedicated-worker-lifecycle.html crashing on all GTK bots 8 9 * fast/workers/change-version-handle-reuse-worker-expected.txt: Removed. 10 * fast/workers/change-version-handle-reuse-worker.html: Removed. 11 * fast/workers/execute-sql-args-worker-expected.txt: Removed. 12 * fast/workers/execute-sql-args-worker.html: Removed. 13 * fast/workers/resources/database-worker-controller.js: Removed. 14 * fast/workers/resources/database-worker.js: Removed. 15 * storage/change-version-handle-reuse-expected.txt: 16 * storage/change-version-handle-reuse.html: 17 * storage/change-version-handle-reuse.js: Removed. 18 * storage/execute-sql-args.html: 19 * storage/execute-sql-args.js: Removed. 20 1 21 2010-04-15 Albert J. Wong <ajwong@chromium.org> 2 22 -
trunk/LayoutTests/storage/change-version-handle-reuse-expected.txt
r57688 r57704 1 This tests that a database can be accessed after changing its version. You should see an error about FooBar table below, not about mismatching versions. 1 This tests that a database can be accessed after changing its version. You should see an error about FooBar table below, not about mismatching versions. Also, reloading the page should not cause an assertion failure. 2 2 changeVersion: transaction callback 3 3 changeVersion: success callback -
trunk/LayoutTests/storage/change-version-handle-reuse.html
r57688 r57704 1 1 <html> 2 2 <head> 3 <script src="change-version-handle-reuse.js"></script>4 3 <script> 5 6 var DB_TEST_SUFFIX = "_dom";7 8 4 function log(message) 9 5 { 10 document.getElementById(" console").innerText += message + "\n";6 document.getElementById("result").innerText += message + "\n"; 11 7 } 12 8 13 function setupAndRunTest() 9 function finishTest() 10 { 11 log("TEST COMPLETE."); 12 13 if (window.layoutTestController) 14 layoutTestController.notifyDone(); 15 } 16 17 function runTest() 14 18 { 15 19 if (window.layoutTestController) { … … 18 22 } 19 23 20 document.getElementById(" console").innerText = "";24 document.getElementById("result").innerText = ""; 21 25 22 runTest(); 26 try { 27 db = openDatabase("ChangeVersion", "", "Test that changing a database version doesn\'t kill our handle to it", 1); 28 var version = db.version; 29 var newVersion = version ? (parseInt(version) + 1).toString() : "1"; 30 db.changeVersion(version, newVersion, function(tx) { 31 log("changeVersion: transaction callback"); 32 }, function(error) { 33 log("changeVersion: error callback: " + error.message); 34 }, function() { 35 log("changeVersion: success callback"); 36 }); 37 38 setTimeout(runTest2, 1000); 39 40 } catch (e) { 41 log("changeVersion exception: " + e); 42 finishTest(); 43 } 44 } 45 46 function runTest2() 47 { 48 try { 49 db.transaction(function(tx) { 50 tx.executeSql("SELECT * from FooBar", [], function(tx) { 51 log("transaction: statement callback"); 52 finishTest(); 53 }, function(tx, error) { 54 log("transaction: statement error callback: " + error.message); 55 finishTest(); 56 }); 57 }); 58 } catch (e) { 59 log("transaction exception: " + e); 60 finishTest(); 61 } 23 62 } 24 63 </script> 25 64 </head> 26 <body onload=" setupAndRunTest()">27 <div>This tests that a database can be accessed after changing its version. You should see an error about FooBar table below, not about mismatching versions. 28 <pre id=" console">65 <body onload="runTest()"> 66 <div>This tests that a database can be accessed after changing its version. You should see an error about FooBar table below, not about mismatching versions. Also, reloading the page should not cause an assertion failure. 67 <pre id="result"> 29 68 FAILURE: test didn't run. 30 69 </pre> -
trunk/LayoutTests/storage/execute-sql-args.html
r57688 r57704 2 2 3 3 <head> 4 <script src="execute-sql-args.js"></script>5 4 <script> 6 5 7 var DB_TEST_SUFFIX = "_dom"; 6 var throwOnToStringObject = { }; 7 throwOnToStringObject.toString = function () { throw "Cannot call toString on this object." }; 8 8 9 function log(message) 9 var throwOnGetLengthObject = { }; 10 throwOnGetLengthObject.__defineGetter__("length", function () { throw "Cannot get length of this object."; }); 11 12 var throwOnGetZeroObject = { length: 1 }; 13 throwOnGetZeroObject.__defineGetter__("0", function () { throw "Cannot get 0 property of this object."; }); 14 15 var expectNoException = [ 16 'null', 17 'undefined', 18 '0', 19 '""', 20 '"", null', 21 '"", undefined', 22 '"", []', 23 '"", [ "arg0" ]', 24 '"", { }', 25 '"", { length: 0 }', 26 '"", { length: 1, 0: "arg0" }', 27 '"", null, null', 28 '"", null, undefined', 29 '"", null, { }', 30 '"", null, null, null', 31 '"", null, null, undefined', 32 '"", null, null, { }', 33 ]; 34 35 var expectException = [ 36 '', 37 'throwOnToStringObject', 38 '"", throwOnGetLengthObject', 39 '"", throwOnGetZeroObject', 40 '"", [ throwOnToStringObject ]', 41 '"", 0', 42 '"", ""', 43 '"", null, 0', 44 '"", null, ""', 45 '"", null, null, 0', 46 '"", null, null, ""', 47 ]; 48 49 function writeMessageToLog(message) 10 50 { 11 51 document.getElementById("console").innerText += message + "\n"; 12 52 } 13 53 14 function setupAndRunTest() 54 function tryExecuteSql(transaction, parameterList) 55 { 56 try { 57 eval('transaction.executeSql(' + parameterList + ')'); 58 return null; 59 } catch (exception) { 60 return exception; 61 } 62 } 63 64 function runTransactionTest(transaction, parameterList, expectException) 65 { 66 var exception = tryExecuteSql(transaction, parameterList); 67 if (expectException) { 68 if (exception) 69 writeMessageToLog("PASS. executeSql(" + parameterList + ") threw an exception as expected."); 70 else 71 writeMessageToLog("*FAIL*. executeSql(" + parameterList + ") did not throw an exception"); 72 } else { 73 if (exception) 74 writeMessageToLog("*FAIL*. executeSql(" + parameterList + ") threw an exception: " + exception); 75 else 76 writeMessageToLog("PASS. executeSql(" + parameterList + ") did not throw an exception"); 77 } 78 } 79 80 function runTransactionTests(transaction) 81 { 82 for (i in expectNoException) 83 runTransactionTest(transaction, expectNoException[i], false); 84 for (i in expectException) 85 runTransactionTest(transaction, expectException[i], true); 86 87 if (window.layoutTestController) 88 layoutTestController.notifyDone(); 89 } 90 91 function runTest() 15 92 { 16 93 if (window.layoutTestController) { … … 18 95 layoutTestController.waitUntilDone(); 19 96 } 20 runTest(); 97 98 var db = openDatabase("ExecuteSQLArgsTest", "1.0", "Test of handling of the arguments to SQLTransaction.executeSql", 1); 99 db.transaction(runTransactionTests); 21 100 } 22 101 … … 24 103 </head> 25 104 26 <body onload=" setupAndRunTest()">105 <body onload="runTest()"> 27 106 <pre id="console"></pre> 28 107 </body> -
trunk/WebCore/ChangeLog
r57701 r57704 1 2010-04-15 Dmitry Titov <dimich@chromium.org> 2 3 Unreviewed, rolling out r57688. 4 http://trac.webkit.org/changeset/57688 5 https://bugs.webkit.org/show_bug.cgi?id=34992 6 7 Makes fast/workers/dedicated-worker-lifecycle.html crashing on all GTK bots 8 9 * bindings/js/JSWorkerContextCustom.cpp: 10 * bindings/v8/custom/V8WorkerContextCustom.cpp: 11 * storage/Database.idl: 12 * storage/SQLError.idl: 13 * storage/SQLResultSet.idl: 14 * storage/SQLResultSetRowList.idl: 15 * storage/SQLTransaction.idl: 16 * workers/WorkerContext.cpp: 17 (WebCore::WorkerContext::openDatabase): 18 * workers/WorkerContext.h: 19 (WebCore::WorkerContext::databaseExceededQuota): 20 * workers/WorkerContext.idl: 21 1 22 2010-04-15 Yury Semikhatsky <yurys@google.com> 2 23 -
trunk/WebCore/bindings/js/JSWorkerContextCustom.cpp
r57688 r57704 30 30 #include "JSWorkerContext.h" 31 31 32 #include "Database.h"33 #include "JSDatabase.h"34 #include "JSDatabaseCallback.h"35 32 #include "JSDOMBinding.h" 36 33 #include "JSDOMGlobalObject.h" … … 166 163 #endif 167 164 168 #if ENABLE(DATABASE)169 JSValue JSWorkerContext::openDatabase(ExecState* exec, const ArgList& args)170 {171 const UString& name = args.at(0).toString(exec);172 const UString& version = args.at(1).toString(exec);173 const UString& displayName = args.at(2).toString(exec);174 unsigned long estimatedSize = args.at(3).toInt32(exec);175 RefPtr<DatabaseCallback> creationCallback;176 if ((args.size() >= 5) && args.at(4).isObject())177 creationCallback = JSDatabaseCallback::create(asObject(args.at(4)), globalObject());178 179 ExceptionCode ec = 0;180 JSValue result = toJS(exec, globalObject(), WTF::getPtr(impl()->openDatabase(name, version, displayName, estimatedSize, creationCallback.release(), ec)));181 setDOMException(exec, ec);182 return result;183 }184 #endif185 186 165 } // namespace WebCore 187 166 -
trunk/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
r57688 r57704 38 38 #include "ScheduledAction.h" 39 39 #include "V8Binding.h" 40 #include "V8Database.h"41 #include "V8DatabaseCallback.h"42 40 #include "V8Proxy.h" 43 41 #include "V8Utilities.h" … … 139 137 } 140 138 141 v8::Handle<v8::Value> V8WorkerContext::openDatabaseCallback(const v8::Arguments& args)142 {143 INC_STATS("DOM.WorkerContext.openDatabase()");144 // Implementation coming soon.145 return v8::Undefined();146 }147 139 } // namespace WebCore 148 140 -
trunk/WebCore/storage/Database.idl
r57688 r57704 31 31 interface [ 32 32 Conditional=DATABASE, 33 OmitConstructor, 34 NoStaticTables 33 OmitConstructor 35 34 ] Database { 36 35 readonly attribute DOMString version; -
trunk/WebCore/storage/SQLError.idl
r57688 r57704 31 31 interface [ 32 32 Conditional=DATABASE, 33 OmitConstructor, 34 NoStaticTables 33 OmitConstructor 35 34 ] SQLError { 36 35 readonly attribute unsigned long code; -
trunk/WebCore/storage/SQLResultSet.idl
r57688 r57704 31 31 interface [ 32 32 Conditional=DATABASE, 33 OmitConstructor, 34 NoStaticTables 33 OmitConstructor 35 34 ] SQLResultSet { 36 35 readonly attribute SQLResultSetRowList rows; -
trunk/WebCore/storage/SQLResultSetRowList.idl
r57688 r57704 31 31 interface [ 32 32 Conditional=DATABASE, 33 OmitConstructor, 34 NoStaticTables 33 OmitConstructor 35 34 ] SQLResultSetRowList { 36 35 readonly attribute unsigned long length; -
trunk/WebCore/storage/SQLTransaction.idl
r57688 r57704 31 31 interface [ 32 32 Conditional=DATABASE, 33 OmitConstructor, 34 NoStaticTables 33 OmitConstructor 35 34 ] SQLTransaction { 36 35 [Custom] void executeSql(in DOMString sqlStatement, in ObjectArray arguments, in SQLStatementCallback callback, in SQLStatementErrorCallback errorCallback); -
trunk/WebCore/workers/WorkerContext.cpp
r57688 r57704 33 33 34 34 #include "ActiveDOMObject.h" 35 #include "DatabaseTracker.h"36 35 #include "DOMTimer.h" 37 36 #include "DOMWindow.h" … … 277 276 } 278 277 278 ASSERT(Database::isAvailable()); 279 279 if (!Database::isAvailable()) 280 280 return 0; … … 282 282 return Database::openDatabase(this, name, version, displayName, estimatedSize, creationCallback, ec); 283 283 } 284 285 void WorkerContext::databaseExceededQuota(const String&)286 {287 #if !PLATFORM(CHROMIUM)288 // FIXME: This needs a real implementation; this is a temporary solution for testing.289 const unsigned long long defaultQuota = 5 * 1024 * 1024;290 DatabaseTracker::tracker().setQuota(securityOrigin(), defaultQuota);291 #endif292 }293 284 #endif 294 285 -
trunk/WebCore/workers/WorkerContext.h
r57688 r57704 108 108 // Not implemented yet. 109 109 virtual bool isDatabaseReadOnly() const { return false; } 110 // Not implemented for realyet.111 virtual void databaseExceededQuota(const String&) ;110 // Not implemented yet. 111 virtual void databaseExceededQuota(const String&) { } 112 112 #endif 113 113 virtual bool isContextThread() const; -
trunk/WebCore/workers/WorkerContext.idl
r57688 r57704 50 50 [Custom] void importScripts(/*[Variadic] in DOMString urls */); 51 51 attribute [Replaceable] WorkerNavigator navigator; 52 #if defined(ENABLE_DATABASE) && ENABLE_DATABASE 53 [EnabledAtRuntime, Custom] Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize, in DatabaseCallback creationCallback) 54 raises(DOMException); 55 #endif 52 // Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); 56 53 // DatabaseSync openDatabaseSync(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); 57 54
Note: See TracChangeset
for help on using the changeset viewer.