Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp

Issue 19724003: Revert "Transition modules/** to use ExceptionState" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.h ('k') | Source/modules/webmidi/MIDIAccess.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
diff --git a/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp b/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
index dfefac44dba963ca409c7e43c891d5caf13fd20f..4caa5d16d22569124610e131a085c4bb42851328 100644
--- a/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
+++ b/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
@@ -30,8 +30,6 @@
#include "modules/webdatabase/WorkerGlobalScopeWebDatabase.h"
#include "RuntimeEnabledFeatures.h"
-#include "bindings/v8/ExceptionState.h"
-#include "core/dom/ExceptionCode.h"
#include "core/workers/WorkerGlobalScope.h"
#include "modules/webdatabase/Database.h"
#include "modules/webdatabase/DatabaseCallback.h"
@@ -41,7 +39,7 @@
namespace WebCore {
-PassRefPtr<Database> WorkerGlobalScopeWebDatabase::openDatabase(WorkerGlobalScope* context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionState& es)
+PassRefPtr<Database> WorkerGlobalScopeWebDatabase::openDatabase(WorkerGlobalScope* context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode& ec)
{
DatabaseManager& dbManager = DatabaseManager::manager();
RefPtr<Database> database;
@@ -49,15 +47,15 @@ PassRefPtr<Database> WorkerGlobalScopeWebDatabase::openDatabase(WorkerGlobalScop
if (RuntimeEnabledFeatures::databaseEnabled() && context->securityOrigin()->canAccessDatabase(context->topOrigin())) {
database = dbManager.openDatabase(context, name, version, displayName, estimatedSize, creationCallback, error);
ASSERT(database || error != DatabaseError::None);
- es.throwDOMException(DatabaseManager::exceptionCodeForDatabaseError(error));
+ ec = DatabaseManager::exceptionCodeForDatabaseError(error);
} else {
- es.throwDOMException(SecurityError);
+ ec = SecurityError;
}
return database.release();
}
-PassRefPtr<DatabaseSync> WorkerGlobalScopeWebDatabase::openDatabaseSync(WorkerGlobalScope* context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionState& es)
+PassRefPtr<DatabaseSync> WorkerGlobalScopeWebDatabase::openDatabaseSync(WorkerGlobalScope* context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode& ec)
{
DatabaseManager& dbManager = DatabaseManager::manager();
RefPtr<DatabaseSync> database;
@@ -66,9 +64,9 @@ PassRefPtr<DatabaseSync> WorkerGlobalScopeWebDatabase::openDatabaseSync(WorkerGl
database = dbManager.openDatabaseSync(context, name, version, displayName, estimatedSize, creationCallback, error);
ASSERT(database || error != DatabaseError::None);
- es.throwDOMException(DatabaseManager::exceptionCodeForDatabaseError(error));
+ ec = DatabaseManager::exceptionCodeForDatabaseError(error);
} else {
- es.throwDOMException(SecurityError);
+ ec = SecurityError;
}
return database.release();
« no previous file with comments | « Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.h ('k') | Source/modules/webmidi/MIDIAccess.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698