Changeset 199581 in webkit
- Timestamp:
- Apr 15, 2016 12:22:50 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r199580 r199581 1 2016-04-15 Brady Eidson <beidson@apple.com> 2 3 Add the message property to DOMError. 4 https://bugs.webkit.org/show_bug.cgi?id=139173 5 6 Reviewed by Alex Christensen. 7 8 * storage/indexeddb/createIndex-after-failure-expected.txt: 9 * storage/indexeddb/createIndex-after-failure-private-expected.txt: 10 * storage/indexeddb/intversion-upgrades-expected.txt: 11 * storage/indexeddb/intversion-upgrades-private-expected.txt: 12 1 13 2016-04-15 Jiewen Tan <jiewen_tan@apple.com> 2 14 -
trunk/LayoutTests/storage/indexeddb/createIndex-after-failure-expected.txt
r195181 r199581 17 17 Now requesting object2 18 18 now we wait. 19 Error function called: (AbortError) undefined20 PASS Abort function called: (ConstraintError) undefined19 Error function called: (AbortError) The transaction was aborted, so the request cannot be fulfilled. 20 PASS Abort function called: (ConstraintError) A mutation operation in the transaction failed because a constraint was not satisfied. 21 21 PASS successfullyParsed is true 22 22 -
trunk/LayoutTests/storage/indexeddb/createIndex-after-failure-private-expected.txt
r195247 r199581 17 17 Now requesting object2 18 18 now we wait. 19 Error function called: (AbortError) undefined20 PASS Abort function called: (ConstraintError) undefined19 Error function called: (AbortError) The transaction was aborted, so the request cannot be fulfilled. 20 PASS Abort function called: (ConstraintError) A mutation operation in the transaction failed because a constraint was not satisfied. 21 21 PASS successfullyParsed is true 22 22 -
trunk/LayoutTests/storage/indexeddb/intversion-upgrades-expected.txt
r195181 r199581 55 55 56 56 errorWhenTryingLowVersion(): 57 request.error.message = undefined57 request.error.message = An attempt was made to open a database using a lower version than the existing version. 58 58 request = indexedDB.open(dbname, 4) 59 59 request.onupgradeneeded = connection4UpgradeNeeded -
trunk/LayoutTests/storage/indexeddb/intversion-upgrades-private-expected.txt
r195247 r199581 55 55 56 56 errorWhenTryingLowVersion(): 57 request.error.message = undefined57 request.error.message = An attempt was made to open a database using a lower version than the existing version. 58 58 request = indexedDB.open(dbname, 4) 59 59 request.onupgradeneeded = connection4UpgradeNeeded -
trunk/Source/WebCore/ChangeLog
r199571 r199581 1 2016-04-15 Brady Eidson <beidson@apple.com> 2 3 Add the message property to DOMError. 4 https://bugs.webkit.org/show_bug.cgi?id=139173 5 6 Reviewed by Alex Christensen. 7 8 No new tests (Updated existing tests). 9 10 Adding this property brings us up to date with other browsers, and will help 11 test the few web features that still use DOMError. 12 13 * Modules/indexeddb/IDBOpenDBRequest.cpp: 14 (WebCore::IDBOpenDBRequest::onError): 15 (WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion): 16 17 * Modules/indexeddb/IDBRequest.cpp: 18 (WebCore::IDBRequest::uncaughtExceptionInEventHandler): 19 (WebCore::IDBRequest::onError): 20 21 * Modules/indexeddb/IDBTransaction.cpp: 22 (WebCore::IDBTransaction::didCreateIndexOnServer): 23 24 * Modules/mediastream/NavigatorUserMediaError.h: 25 (WebCore::NavigatorUserMediaError::NavigatorUserMediaError): 26 27 * dom/DOMError.cpp: 28 (WebCore::DOMError::DOMError): 29 30 * dom/DOMError.h: 31 (WebCore::DOMError::create): 32 (WebCore::DOMError::message): 33 * dom/DOMError.idl: 34 1 35 2016-04-14 Brent Fulgham <bfulgham@apple.com> 2 36 -
trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp
r198762 r199581 65 65 void IDBOpenDBRequest::onError(const IDBResultData& data) 66 66 { 67 m_domError = DOMError::create(data.error().name() );67 m_domError = DOMError::create(data.error().name(), data.error().message()); 68 68 enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, true, true, *this)); 69 69 } … … 98 98 99 99 IDBError idbError(IDBDatabaseException::AbortError); 100 m_domError = DOMError::create(idbError.name() );100 m_domError = DOMError::create(idbError.name(), idbError.message()); 101 101 m_result = IDBAny::createUndefined(); 102 102 -
trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp
r199524 r199581 322 322 323 323 if (m_transaction && m_idbError.code() != IDBDatabaseException::AbortError) 324 m_transaction->abortDueToFailedRequest(DOMError::create(IDBDatabaseException::getErrorName(IDBDatabaseException::AbortError) ));324 m_transaction->abortDueToFailedRequest(DOMError::create(IDBDatabaseException::getErrorName(IDBDatabaseException::AbortError), ASCIILiteral("IDBTransaction will abort due to uncaught exception in an event handler"))); 325 325 } 326 326 … … 422 422 423 423 ASSERT(!m_idbError.isNull()); 424 m_domError = DOMError::create(m_idbError.name() );424 m_domError = DOMError::create(m_idbError.name(), m_idbError.message()); 425 425 enqueueEvent(Event::create(eventNames().errorEvent, true, true)); 426 426 } -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
r199524 r199581 597 597 598 598 // Otherwise, failure to create an index forced abortion of the transaction. 599 abortDueToFailedRequest(DOMError::create(IDBDatabaseException::getErrorName(resultData.error().code()) ));599 abortDueToFailedRequest(DOMError::create(IDBDatabaseException::getErrorName(resultData.error().code()), resultData.error().message())); 600 600 } 601 601 -
trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.h
r184940 r199581 51 51 private: 52 52 NavigatorUserMediaError(const String& name, const String& constraintName) 53 : DOMError(name )53 : DOMError(name, { }) 54 54 , m_constraintName(constraintName) 55 55 { -
trunk/Source/WebCore/dom/DOMError.cpp
r158569 r199581 1 1 /* 2 2 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2016 Apple Inc. All Rights Reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 27 28 #include "DOMError.h" 28 29 29 30 30 namespace WebCore { 31 31 32 DOMError::DOMError(const String& name )32 DOMError::DOMError(const String& name, const String& message) 33 33 : m_name(name) 34 , m_message(message) 34 35 { 35 36 } -
trunk/Source/WebCore/dom/DOMError.h
r177733 r199581 1 1 /* 2 2 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2016 Apple Inc. All Rights Reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 34 35 class DOMError : public RefCounted<DOMError> { 35 36 public: 36 static Ref<DOMError> create(const String& name )37 static Ref<DOMError> create(const String& name, const String& message = { }) 37 38 { 38 return adoptRef(*new DOMError(name ));39 return adoptRef(*new DOMError(name, message)); 39 40 } 40 41 virtual ~DOMError() { } 41 42 42 43 const String& name() const { return m_name; } 44 const String& message() const { return m_message; } 43 45 44 46 protected: 45 explicit DOMError(const String& name );47 explicit DOMError(const String& name, const String& message); 46 48 47 49 private: 48 const String m_name; 50 String m_name; 51 String m_message; 49 52 }; 50 53 -
trunk/Source/WebCore/dom/DOMError.idl
r165676 r199581 31 31 ] interface DOMError { 32 32 readonly attribute DOMString name; 33 readonly attribute DOMString message; 33 34 }; 34 35
Note: See TracChangeset
for help on using the changeset viewer.