Changeset 61531 in webkit


Ignore:
Timestamp:
Jun 21, 2010 12:10:05 AM (14 years ago)
Author:
dumi@chromium.org
Message:

Adding the SQLException class which will be used to report sync DB errors.
https://bugs.webkit.org/show_bug.cgi?id=40607

Reviewed by Adam Barth.

WebCore:

  • Android.derived.jscbindings.mk:
  • Android.derived.v8bindings.mk:
  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • GNUmakefile.am:
  • WebCore.gypi:
  • WebCore.pri:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMBinding.cpp:

(WebCore::setDOMException):

  • bindings/js/JSExceptionBase.cpp:

(WebCore::toExceptionBase):

  • bindings/v8/V8Proxy.cpp:

(WebCore::V8Proxy::setDOMException):

  • bindings/v8/V8Proxy.h:
  • dom/ExceptionCode.cpp:

(WebCore::):
(WebCore::getExceptionCodeDescription):

  • dom/ExceptionCode.h:

(WebCore::):

  • page/DOMWindow.idl:
  • storage/SQLException.h: Added.

(WebCore::SQLException::create):
(WebCore::SQLException::):
(WebCore::SQLException::SQLException):

  • storage/SQLException.idl: Added.

LayoutTests:

  • fast/dom/Window/window-properties-expected.txt:
  • fast/dom/Window/window-property-descriptors-expected.txt:
  • fast/dom/prototype-inheritance-expected.txt:
  • fast/js/global-constructors-expected.txt:
  • platform/chromium/fast/dom/prototype-inheritance-expected.txt:
  • platform/gtk/fast/dom/Window/window-properties-expected.txt:
  • platform/gtk/fast/dom/prototype-inheritance-expected.txt:
  • platform/qt/fast/dom/Window/window-properties-expected.txt:
  • platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
  • platform/qt/fast/dom/prototype-inheritance-expected.txt:
  • platform/qt/fast/js/global-constructors-expected.txt:
  • platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
  • platform/win/fast/js/global-constructors-expected.txt:
Location:
trunk
Files:
2 added
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61530 r61531  
     12010-06-20  Dumitru Daniliuc  <dumi@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Adding the SQLException class which will be used to report sync DB errors.
     6        https://bugs.webkit.org/show_bug.cgi?id=40607
     7
     8        * fast/dom/Window/window-properties-expected.txt:
     9        * fast/dom/Window/window-property-descriptors-expected.txt:
     10        * fast/dom/prototype-inheritance-expected.txt:
     11        * fast/js/global-constructors-expected.txt:
     12        * platform/chromium/fast/dom/prototype-inheritance-expected.txt:
     13        * platform/gtk/fast/dom/Window/window-properties-expected.txt:
     14        * platform/gtk/fast/dom/prototype-inheritance-expected.txt:
     15        * platform/qt/fast/dom/Window/window-properties-expected.txt:
     16        * platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
     17        * platform/qt/fast/dom/prototype-inheritance-expected.txt:
     18        * platform/qt/fast/js/global-constructors-expected.txt:
     19        * platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
     20        * platform/win/fast/js/global-constructors-expected.txt:
     21
    1222010-06-20  Hayato Ito  <hayato@chromium.org>
    223
  • trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt

    r61136 r61531  
    12931293window.Rect.prototype [object RectPrototype]
    12941294window.ReferenceError [function]
     1295window.SQLException [object SQLExceptionConstructor]
     1296window.SQLException.CONSTRAINT_ERR [number]
     1297window.SQLException.DATABASE_ERR [number]
     1298window.SQLException.QUOTA_ERR [number]
     1299window.SQLException.SYNTAX_ERR [number]
     1300window.SQLException.TIMEOUT_ERR [number]
     1301window.SQLException.TOO_LARGE_ERR [number]
     1302window.SQLException.UNKNOWN_ERR [number]
     1303window.SQLException.VERSION_ERR [number]
     1304window.SQLException.prototype [object SQLExceptionPrototype]
     1305window.SQLException.prototype.CONSTRAINT_ERR [number]
     1306window.SQLException.prototype.DATABASE_ERR [number]
     1307window.SQLException.prototype.QUOTA_ERR [number]
     1308window.SQLException.prototype.SYNTAX_ERR [number]
     1309window.SQLException.prototype.TIMEOUT_ERR [number]
     1310window.SQLException.prototype.TOO_LARGE_ERR [number]
     1311window.SQLException.prototype.UNKNOWN_ERR [number]
     1312window.SQLException.prototype.VERSION_ERR [number]
    12951313window.SVGAElement [object SVGAElementConstructor]
    12961314window.SVGAElement.prototype [printed above as window.Element.prototype]
  • trunk/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt

    r61071 r61531  
    157157PASS typeof Object.getOwnPropertyDescriptor(window, 'ReferenceError') is 'object'
    158158PASS typeof Object.getOwnPropertyDescriptor(window, 'RegExp') is 'object'
     159PASS typeof Object.getOwnPropertyDescriptor(window, 'SQLException') is 'object'
    159160PASS typeof Object.getOwnPropertyDescriptor(window, 'SVGAElement') is 'object'
    160161PASS typeof Object.getOwnPropertyDescriptor(window, 'SVGAltGlyphElement') is 'object'
  • trunk/LayoutTests/fast/dom/prototype-inheritance-expected.txt

    r61071 r61531  
    286286PASS inner.ReferenceError.isInner is true
    287287PASS inner.ReferenceError.constructor.isInner is true
     288PASS inner.SQLException.isInner is true
     289PASS inner.SQLException.constructor.isInner is true
    288290PASS inner.SVGAElement.isInner is true
    289291PASS inner.SVGAElement.constructor.isInner is true
  • trunk/LayoutTests/fast/js/global-constructors-expected.txt

    r61136 r61531  
    142142PASS RangeException.toString() is '[object RangeExceptionConstructor]'
    143143PASS Rect.toString() is '[object RectConstructor]'
     144PASS SQLException.toString() is '[object SQLExceptionConstructor]'
    144145PASS SVGAElement.toString() is '[object SVGAElementConstructor]'
    145146PASS SVGAltGlyphElement.toString() is '[object SVGAltGlyphElementConstructor]'
  • trunk/LayoutTests/platform/chromium/fast/dom/prototype-inheritance-expected.txt

    r61479 r61531  
    280280PASS inner.Rect.isInner is true
    281281PASS inner.Rect.constructor.isInner is true
     282PASS inner.SQLException.isInner is true
     283PASS inner.SQLException.constructor.isInner is true
    282284PASS inner.SVGAElement.isInner is true
    283285PASS inner.SVGAElement.constructor.isInner is true
  • trunk/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt

    r61071 r61531  
    12531253window.Rect.prototype [object RectPrototype]
    12541254window.ReferenceError [function]
     1255window.SQLException [object SQLExceptionConstructor]
     1256window.SQLException.CONSTRAINT_ERR [number]
     1257window.SQLException.DATABASE_ERR [number]
     1258window.SQLException.QUOTA_ERR [number]
     1259window.SQLException.SYNTAX_ERR [number]
     1260window.SQLException.TIMEOUT_ERR [number]
     1261window.SQLException.TOO_LARGE_ERR [number]
     1262window.SQLException.UNKNOWN_ERR [number]
     1263window.SQLException.VERSION_ERR [number]
     1264window.SQLException.prototype [object SQLExceptionPrototype]
     1265window.SQLException.prototype.CONSTRAINT_ERR [number]
     1266window.SQLException.prototype.DATABASE_ERR [number]
     1267window.SQLException.prototype.QUOTA_ERR [number]
     1268window.SQLException.prototype.SYNTAX_ERR [number]
     1269window.SQLException.prototype.TIMEOUT_ERR [number]
     1270window.SQLException.prototype.TOO_LARGE_ERR [number]
     1271window.SQLException.prototype.UNKNOWN_ERR [number]
     1272window.SQLException.prototype.VERSION_ERR [number]
    12551273window.SVGAngle [object SVGAngleConstructor]
    12561274window.SVGAngle.SVG_ANGLETYPE_DEG [number]
  • trunk/LayoutTests/platform/gtk/fast/dom/prototype-inheritance-expected.txt

    r61071 r61531  
    282282PASS inner.ReferenceError.isInner is true
    283283PASS inner.ReferenceError.constructor.isInner is true
     284PASS inner.SQLException.isInner is true
     285PASS inner.SQLException.constructor.isInner is true
    284286PASS inner.SVGAElement.isInner is true
    285287PASS inner.SVGAElement.constructor.isInner is true
  • trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt

    r61142 r61531  
    12931293window.Rect.prototype [object RectPrototype]
    12941294window.ReferenceError [function]
     1295window.SQLException [object SQLExceptionConstructor]
     1296window.SQLException.CONSTRAINT_ERR [number]
     1297window.SQLException.DATABASE_ERR [number]
     1298window.SQLException.QUOTA_ERR [number]
     1299window.SQLException.SYNTAX_ERR [number]
     1300window.SQLException.TIMEOUT_ERR [number]
     1301window.SQLException.TOO_LARGE_ERR [number]
     1302window.SQLException.UNKNOWN_ERR [number]
     1303window.SQLException.VERSION_ERR [number]
     1304window.SQLException.prototype [object SQLExceptionPrototype]
     1305window.SQLException.prototype.CONSTRAINT_ERR [number]
     1306window.SQLException.prototype.DATABASE_ERR [number]
     1307window.SQLException.prototype.QUOTA_ERR [number]
     1308window.SQLException.prototype.SYNTAX_ERR [number]
     1309window.SQLException.prototype.TIMEOUT_ERR [number]
     1310window.SQLException.prototype.TOO_LARGE_ERR [number]
     1311window.SQLException.prototype.UNKNOWN_ERR [number]
     1312window.SQLException.prototype.VERSION_ERR [number]
    12951313window.SVGAElement [object SVGAElementConstructor]
    12961314window.SVGAElement.prototype [printed above as window.Element.prototype]
  • trunk/LayoutTests/platform/qt/fast/dom/Window/window-property-descriptors-expected.txt

    r61071 r61531  
    157157PASS typeof Object.getOwnPropertyDescriptor(window, 'ReferenceError') is 'object'
    158158PASS typeof Object.getOwnPropertyDescriptor(window, 'RegExp') is 'object'
     159PASS typeof Object.getOwnPropertyDescriptor(window, 'SQLException') is 'object'
    159160PASS typeof Object.getOwnPropertyDescriptor(window, 'SVGAElement') is 'object'
    160161PASS typeof Object.getOwnPropertyDescriptor(window, 'SVGAngle') is 'object'
  • trunk/LayoutTests/platform/qt/fast/dom/prototype-inheritance-expected.txt

    r61071 r61531  
    286286PASS inner.ReferenceError.isInner is true
    287287PASS inner.ReferenceError.constructor.isInner is true
     288PASS inner.SQLException.isInner is true
     289PASS inner.SQLException.constructor.isInner is true
    288290PASS inner.SVGAElement.isInner is true
    289291PASS inner.SVGAElement.constructor.isInner is true
  • trunk/LayoutTests/platform/qt/fast/js/global-constructors-expected.txt

    r61142 r61531  
    142142PASS RangeException.toString() is '[object RangeExceptionConstructor]'
    143143PASS Rect.toString() is '[object RectConstructor]'
     144PASS SQLException.toString() is '[object SQLExceptionConstructor]'
    144145PASS SVGAElement.toString() is '[object SVGAElementConstructor]'
    145146PASS SVGAngle.toString() is '[object SVGAngleConstructor]'
  • trunk/LayoutTests/platform/win/fast/dom/Window/window-property-descriptors-expected.txt

    r61096 r61531  
    155155PASS typeof Object.getOwnPropertyDescriptor(window, 'ReferenceError') is 'object'
    156156PASS typeof Object.getOwnPropertyDescriptor(window, 'RegExp') is 'object'
     157PASS typeof Object.getOwnPropertyDescriptor(window, 'SQLException') is 'object'
    157158PASS typeof Object.getOwnPropertyDescriptor(window, 'SVGAElement') is 'object'
    158159PASS typeof Object.getOwnPropertyDescriptor(window, 'SVGAltGlyphElement') is 'object'
  • trunk/LayoutTests/platform/win/fast/js/global-constructors-expected.txt

    r61261 r61531  
    140140PASS RangeException.toString() is '[object RangeExceptionConstructor]'
    141141PASS Rect.toString() is '[object RectConstructor]'
     142PASS SQLException.toString() is '[object SQLExceptionConstructor]'
    142143PASS SVGAElement.toString() is '[object SVGAElementConstructor]'
    143144PASS SVGAltGlyphElement.toString() is '[object SVGAltGlyphElementConstructor]'
  • trunk/WebCore/Android.derived.jscbindings.mk

    r61120 r61531  
    328328    $(intermediates)/storage/JSDatabase.h \
    329329    $(intermediates)/storage/JSSQLError.h \
     330    $(intermediates)/storage/JSSQLException.h \
    330331    $(intermediates)/storage/JSSQLResultSet.h \
    331332    $(intermediates)/storage/JSSQLResultSetRowList.h \
  • trunk/WebCore/Android.derived.v8bindings.mk

    r61120 r61531  
    309309    $(intermediates)/bindings/V8Database.h \
    310310    $(intermediates)/bindings/V8SQLError.h \
     311    $(intermediates)/bindings/V8SQLException.h \
    311312    $(intermediates)/bindings/V8SQLResultSet.h \
    312313    $(intermediates)/bindings/V8SQLResultSetRowList.h \
  • trunk/WebCore/CMakeLists.txt

    r61528 r61531  
    336336    storage/IndexedDatabaseRequest.idl
    337337    storage/SQLError.idl
     338    storage/SQLException.idl
    338339    storage/SQLResultSet.idl
    339340    storage/SQLResultSetRowList.idl
  • trunk/WebCore/ChangeLog

    r61529 r61531  
     12010-06-20  Dumitru Daniliuc  <dumi@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Adding the SQLException class which will be used to report sync DB errors.
     6        https://bugs.webkit.org/show_bug.cgi?id=40607
     7
     8        * Android.derived.jscbindings.mk:
     9        * Android.derived.v8bindings.mk:
     10        * CMakeLists.txt:
     11        * DerivedSources.cpp:
     12        * DerivedSources.make:
     13        * GNUmakefile.am:
     14        * WebCore.gypi:
     15        * WebCore.pri:
     16        * WebCore.vcproj/WebCore.vcproj:
     17        * WebCore.xcodeproj/project.pbxproj:
     18        * bindings/js/JSDOMBinding.cpp:
     19        (WebCore::setDOMException):
     20        * bindings/js/JSExceptionBase.cpp:
     21        (WebCore::toExceptionBase):
     22        * bindings/v8/V8Proxy.cpp:
     23        (WebCore::V8Proxy::setDOMException):
     24        * bindings/v8/V8Proxy.h:
     25        * dom/ExceptionCode.cpp:
     26        (WebCore::):
     27        (WebCore::getExceptionCodeDescription):
     28        * dom/ExceptionCode.h:
     29        (WebCore::):
     30        * page/DOMWindow.idl:
     31        * storage/SQLException.h: Added.
     32        (WebCore::SQLException::create):
     33        (WebCore::SQLException::):
     34        (WebCore::SQLException::SQLException):
     35        * storage/SQLException.idl: Added.
     36
    1372010-06-20  Yury Semikhatsky  <yurys@chromium.org>
    238
  • trunk/WebCore/DerivedSources.cpp

    r61120 r61531  
    222222#include "JSSharedWorkerContext.cpp"
    223223#include "JSSQLError.cpp"
     224#include "JSSQLException.cpp"
    224225#include "JSSQLResultSet.cpp"
    225226#include "JSSQLResultSetRowList.cpp"
  • trunk/WebCore/DerivedSources.make

    r61120 r61531  
    266266    ScriptProfileNode \
    267267    SQLError \
     268    SQLException \
    268269    SQLResultSet \
    269270    SQLResultSetRowList \
  • trunk/WebCore/GNUmakefile.am

    r61511 r61531  
    23862386        WebCore/storage/DatabaseSync.idl \
    23872387        WebCore/storage/SQLError.idl \
     2388        WebCore/storage/SQLException.idl \
    23882389        WebCore/storage/SQLResultSet.idl \
    23892390        WebCore/storage/SQLResultSetRowList.idl \
     
    24412442        WebCore/storage/OriginUsageRecord.h \
    24422443        WebCore/storage/SQLError.h \
     2444        WebCore/storage/SQLException.h \
    24432445        WebCore/storage/SQLResultSet.cpp \
    24442446        WebCore/storage/SQLResultSet.h \
  • trunk/WebCore/WebCore.gypi

    r61514 r61531  
    239239            'storage/IndexedDatabaseRequest.idl',
    240240            'storage/SQLError.idl',
     241            'storage/SQLException.idl',
    241242            'storage/SQLResultSet.idl',
    242243            'storage/SQLResultSetRowList.idl',
     
    34213422            'storage/OriginUsageRecord.h',
    34223423            'storage/SQLError.h',
     3424            'storage/SQLException.h',
    34233425            'storage/SQLResultSet.cpp',
    34243426            'storage/SQLResultSet.h',
  • trunk/WebCore/WebCore.pri

    r61338 r61531  
    475475    storage/StorageEvent.idl \
    476476    storage/SQLError.idl \
     477    storage/SQLException.idl \
    477478    storage/SQLResultSet.idl \
    478479    storage/SQLResultSetRowList.idl \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r61511 r61531  
    4643846438                        </File>
    4643946439                        <File
     46440                                RelativePath="..\storage\SQLException.h"
     46441                                >
     46442                        </File>
     46443                        <File
    4644046444                                RelativePath="..\storage\SQLResultSet.cpp"
    4644146445                                >
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r61511 r61531  
    42274227                B523CF0A1182675400EBB29C /* DatabaseSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B523CF031182675400EBB29C /* DatabaseSync.cpp */; };
    42284228                B523CF0B1182675400EBB29C /* DatabaseSync.h in Headers */ = {isa = PBXBuildFile; fileRef = B523CF041182675400EBB29C /* DatabaseSync.h */; };
     4229                B525A96511CA2340003A23A8 /* JSSQLException.h in Headers */ = {isa = PBXBuildFile; fileRef = B525A96311CA2340003A23A8 /* JSSQLException.h */; };
     4230                B525A96611CA2340003A23A8 /* JSSQLException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B525A96411CA2340003A23A8 /* JSSQLException.cpp */; };
    42294231                B55D5AA4119131FC00BCC315 /* JSSQLTransactionSyncCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B55D5AA2119131FC00BCC315 /* JSSQLTransactionSyncCallback.h */; };
    42304232                B55D5AA5119131FC00BCC315 /* JSSQLTransactionSyncCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B55D5AA3119131FC00BCC315 /* JSSQLTransactionSyncCallback.cpp */; };
    42314233                B55D5AA81191325000BCC315 /* JSDatabaseSyncCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B55D5AA61191325000BCC315 /* JSDatabaseSyncCustom.cpp */; };
    42324234                B55D5AA91191325000BCC315 /* JSSQLTransactionSyncCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B55D5AA71191325000BCC315 /* JSSQLTransactionSyncCustom.cpp */; };
     4235                B56EBA8511C9FF8100B04477 /* SQLException.h in Headers */ = {isa = PBXBuildFile; fileRef = B56EBA8311C9FF8100B04477 /* SQLException.h */; };
    42334236                B58CEB6911913607002A6790 /* JSDatabaseSync.h in Headers */ = {isa = PBXBuildFile; fileRef = B58CEB6711913607002A6790 /* JSDatabaseSync.h */; };
    42344237                B58CEB6A11913607002A6790 /* JSDatabaseSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B58CEB6811913607002A6790 /* JSDatabaseSync.cpp */; };
     
    97159718                B523CF031182675400EBB29C /* DatabaseSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseSync.cpp; sourceTree = "<group>"; };
    97169719                B523CF041182675400EBB29C /* DatabaseSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseSync.h; sourceTree = "<group>"; };
     9720                B525A96311CA2340003A23A8 /* JSSQLException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLException.h; sourceTree = "<group>"; };
     9721                B525A96411CA2340003A23A8 /* JSSQLException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLException.cpp; sourceTree = "<group>"; };
    97179722                B55D5AA2119131FC00BCC315 /* JSSQLTransactionSyncCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLTransactionSyncCallback.h; sourceTree = "<group>"; };
    97189723                B55D5AA3119131FC00BCC315 /* JSSQLTransactionSyncCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLTransactionSyncCallback.cpp; sourceTree = "<group>"; };
     
    97229727                B55D5ABC1191327200BCC315 /* SQLTransactionSync.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLTransactionSync.idl; sourceTree = "<group>"; };
    97239728                B55D5ABD1191327200BCC315 /* SQLTransactionSyncCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLTransactionSyncCallback.idl; sourceTree = "<group>"; };
     9729                B56EBA8311C9FF8100B04477 /* SQLException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLException.h; sourceTree = "<group>"; };
     9730                B56EBA8411C9FF8100B04477 /* SQLException.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLException.idl; sourceTree = "<group>"; };
    97249731                B58CEB6711913607002A6790 /* JSDatabaseSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDatabaseSync.h; sourceTree = "<group>"; };
    97259732                B58CEB6811913607002A6790 /* JSDatabaseSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDatabaseSync.cpp; sourceTree = "<group>"; };
     
    1112411131                                51EC92570CE90DB400F90308 /* SQLError.h */,
    1112511132                                51EC92580CE90DB400F90308 /* SQLError.idl */,
     11133                                B56EBA8311C9FF8100B04477 /* SQLException.h */,
     11134                                B56EBA8411C9FF8100B04477 /* SQLException.idl */,
    1112611135                                519611670CAC56570010A80C /* SQLResultSet.cpp */,
    1112711136                                519611680CAC56570010A80C /* SQLResultSet.h */,
     
    1449714506                                514C76350CE9225E007EF3CD /* JSSQLError.cpp */,
    1449814507                                BC8243250D0CE8A200460C8F /* JSSQLError.h */,
     14508                                B525A96311CA2340003A23A8 /* JSSQLException.h */,
     14509                                B525A96411CA2340003A23A8 /* JSSQLException.cpp */,
    1449914510                                1AE82FEA0CAB07EE002237AE /* JSSQLResultSet.cpp */,
    1450014511                                1AE82FEB0CAB07EE002237AE /* JSSQLResultSet.h */,
     
    1945819469                                1AD8F81B11CAB9E900E93E54 /* PlatformStrategies.h in Headers */,
    1945919470                                1AA8799011CBE846003C664F /* PluginStrategy.h in Headers */,
     19471                                B56EBA8511C9FF8100B04477 /* SQLException.h in Headers */,
     19472                                B525A96511CA2340003A23A8 /* JSSQLException.h in Headers */,
    1946019473                        );
    1946119474                        runOnlyForDeploymentPostprocessing = 0;
     
    2176921782                                200B190911C277D900DCCD3A /* ScriptBreakpoint.cpp in Sources */,
    2177021783                                1AD8F81C11CAB9E900E93E54 /* PlatformStrategies.cpp in Sources */,
     21784                                B525A96611CA2340003A23A8 /* JSSQLException.cpp in Sources */,
    2177121785                        );
    2177221786                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/bindings/js/JSDOMBinding.cpp

    r60762 r61531  
    7070#include "JSXPathException.h"
    7171#include "XPathException.h"
     72#endif
     73
     74#if ENABLE(DATABASE)
     75#include "JSSQLException.h"
     76#include "SQLException.h"
    7277#endif
    7378
     
    601606            break;
    602607#endif
     608#if ENABLE(DATABASE)
     609        case SQLExceptionType:
     610            errorObject = toJS(exec, globalObject, SQLException::create(description));
     611            break;
     612#endif
    603613    }
    604614
  • trunk/WebCore/bindings/js/JSExceptionBase.cpp

    r49723 r61531  
    3737#include "JSXPathException.h"
    3838#endif
    39  
     39#if ENABLE(XPATH)
     40#include "JSSQLException.h"
     41#endif
     42
    4043namespace WebCore {
    41  
     44
    4245ExceptionBase* toExceptionBase(JSC::JSValue value)
    4346{
     
    5861        return reinterpret_cast<ExceptionBase*>(pathException);
    5962#endif
    60    
     63#if ENABLE(DATABASE)
     64    if (SQLException* pathException = toSQLException(value))
     65        return reinterpret_cast<ExceptionBase*>(pathException);
     66#endif
     67
    6168    return 0;
    6269}
  • trunk/WebCore/bindings/v8/V8Proxy.cpp

    r61499 r61531  
    5757#include "V8IsolatedContext.h"
    5858#include "V8RangeException.h"
     59#include "V8SQLException.h"
    5960#include "V8XMLHttpRequestException.h"
    6061#include "V8XPathException.h"
     
    703704        break;
    704705#endif
     706#if ENABLE(DATABASE)
     707    case SQLExceptionType:
     708        exception = toV8(SQLException::create(description));
     709        break;
     710#endif
    705711    default:
    706712        ASSERT_NOT_REACHED();
  • trunk/WebCore/bindings/v8/V8Proxy.h

    r61499 r61531  
    361361#endif
    362362
     363#if ENABLE(DATABASE)
     364        static const char* sqlExceptionName(int exceptionCode);
     365#endif
     366
    363367        Frame* m_frame;
    364368
  • trunk/WebCore/dom/ExceptionCode.cpp

    r49723 r61531  
    3939#endif
    4040
     41#if ENABLE(DATABASE)
     42#include "SQLException.h"
     43#endif
     44
    4145namespace WebCore {
    4246
     
    146150#endif
    147151
     152#if ENABLE(DATABASE)
     153static const char* const sqlExceptionNames[] = {
     154    "UNKNOWN_ERR",
     155    "DATABASE_ERR",
     156    "VERSION_ERR",
     157    "TOO_LARGE_ERR",
     158    "QUOTA_ERR",
     159    "SYNTAX_ERR",
     160    "CONSTRAINT_ERR",
     161    "TIMEOUT_ERR"
     162};
     163
     164static const char* const sqlExceptionDescriptions[] = {
     165    "The operation failed for reasons unrelated to the database.",
     166    "The operation failed for some reason related to the database.",
     167    "The actual database version did not match the expected version.",
     168    "Data returned from the database is too large.",
     169    "Quota was exceeded.",
     170    "Invalid or unauthorized statement; or the number of arguments did not match the number of ? placeholders.",
     171    "A constraint was violated.",
     172    "A transaction lock could not be acquired in a reasonable time."
     173};
     174#endif
     175
    148176void getExceptionCodeDescription(ExceptionCode ec, ExceptionCodeDescription& description)
    149177{
     
    157185    int nameTableOffset;
    158186    ExceptionType type;
    159    
     187
    160188    if (code >= RangeException::RangeExceptionOffset && code <= RangeException::RangeExceptionMax) {
    161189        type = RangeExceptionType;
     
    204232        nameTableOffset = SVGException::SVG_WRONG_TYPE_ERR;
    205233#endif
     234#if ENABLE(DATABASE)
     235    } else if (code >= SQLException::SQLExceptionOffset && code <= SQLException::SQLExceptionMax) {
     236        type = SQLExceptionType;
     237        typeName = "DOM SQL";
     238        code -= SQLException::SQLExceptionOffset;
     239        nameTable = sqlExceptionNames;
     240        descriptionTable = sqlExceptionDescriptions;
     241        nameTableSize = sizeof(sqlExceptionNames) / sizeof(sqlExceptionNames[0]);
     242        nameTableOffset = SQLException::UNKNOWN_ERR;
     243#endif
    206244    } else {
    207245        type = DOMExceptionType;
  • trunk/WebCore/dom/ExceptionCode.h

    r58194 r61531  
    7979        , SVGExceptionType
    8080#endif
    81     };       
    82    
     81#if ENABLE(DATABASE)
     82        , SQLExceptionType
     83#endif
     84    };
     85
    8386
    8487    struct ExceptionCodeDescription {
  • trunk/WebCore/page/DOMWindow.idl

    r61492 r61531  
    730730#endif
    731731
     732#if defined(ENABLE_DATABASE)
     733        attribute SQLExceptionConstructor SQLException;
     734#endif
     735
    732736        attribute [Conditional=TOUCH_EVENTS] TouchEventConstructor TouchEvent;
    733737
Note: See TracChangeset for help on using the changeset viewer.