Bug 157792 - Sync DOM exception types with WebIDL and update promise rejections
Summary: Sync DOM exception types with WebIDL and update promise rejections
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-17 07:32 PDT by youenn fablet
Modified: 2016-05-18 08:21 PDT (History)
6 users (show)

See Also:


Attachments
Patch (54.28 KB, patch)
2016-05-17 07:41 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Fixing mac build (54.46 KB, patch)
2016-05-17 08:05 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-yosemite (1.27 MB, application/zip)
2016-05-17 08:51 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (1.06 MB, application/zip)
2016-05-17 09:02 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (1.09 MB, application/zip)
2016-05-17 09:09 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews113 for mac-yosemite (1.59 MB, application/zip)
2016-05-17 09:22 PDT, Build Bot
no flags Details
Rebasing tests (66.51 KB, patch)
2016-05-17 13:01 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2 (1.08 MB, application/zip)
2016-05-17 13:59 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-yosemite (951.89 KB, application/zip)
2016-05-17 15:52 PDT, Build Bot
no flags Details
Rebasing ios-sim tests (73.31 KB, patch)
2016-05-17 23:46 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (73.35 KB, patch)
2016-05-18 07:51 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2016-05-17 07:32:03 PDT
It would be good to sync the DOM exceptions with https://heycam.github.io/webidl/#idl-DOMException-error-names?
This could be used to almost always reject promises using reject(ExceptionCode) in most cases.
Comment 1 youenn fablet 2016-05-17 07:41:28 PDT
Created attachment 279121 [details]
Patch
Comment 2 WebKit Commit Bot 2016-05-17 07:43:13 PDT
Attachment 279121 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/ExceptionCode.h:68:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:69:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:70:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:71:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:72:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:73:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:74:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:75:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:76:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:77:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 10 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 youenn fablet 2016-05-17 07:49:39 PDT
> ERROR: Source/WebCore/dom/ExceptionCode.h:68:  enum members should use
> InterCaps with an initial capital letter or initial 'k' for C-style enums. 
> [readability/enum_casing] [4]

I was not sure of the style for new errors.
I guess camel-based naming would be preferable for new errors.
Comment 4 youenn fablet 2016-05-17 08:05:05 PDT
Created attachment 279123 [details]
Fixing mac build
Comment 5 WebKit Commit Bot 2016-05-17 08:06:32 PDT
Attachment 279123 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/ExceptionCode.h:68:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:69:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:70:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:71:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:72:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:73:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:74:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:75:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:76:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:77:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 10 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Build Bot 2016-05-17 08:51:38 PDT
Comment on attachment 279123 [details]
Fixing mac build

Attachment 279123 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1336903

New failing tests:
fast/dynamic/015.html
fast/inspector-support/uncaught-dom1-exception.html
svg/dom/SVGTransformList.html
fast/dom/HTMLSelectElement/select-selectedIndex.html
inspector/debugger/setPauseOnExceptions-none.html
fast/inspector-support/uncaught-dom8-exception.html
fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html
fast/inspector-support/uncaught-dom3-exception.html
crypto/crypto-random-values-types.html
fast/dom/Geolocation/argument-types.html
fast/dom/insertAdjacentHTML-DocumentFragment-crash.html
inspector/debugger/setPauseOnExceptions-uncaught.html
fast/regions/selection/crash-deselect.html
inspector/debugger/regress-133182.html
inspector/debugger/setPauseOnExceptions-all.html
js/dom/reflect-set-onto-dom.html
fast/dom/Geolocation/not-enough-arguments.html
Comment 7 Build Bot 2016-05-17 08:51:41 PDT
Created attachment 279125 [details]
Archive of layout-test-results from ews102 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 8 Build Bot 2016-05-17 09:02:22 PDT
Comment on attachment 279123 [details]
Fixing mac build

Attachment 279123 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1336933

New failing tests:
fast/dynamic/015.html
fast/inspector-support/uncaught-dom1-exception.html
svg/dom/SVGTransformList.html
fast/dom/HTMLSelectElement/select-selectedIndex.html
inspector/debugger/setPauseOnExceptions-none.html
fast/inspector-support/uncaught-dom8-exception.html
fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html
fast/inspector-support/uncaught-dom3-exception.html
crypto/crypto-random-values-types.html
fast/dom/Geolocation/argument-types.html
fast/dom/insertAdjacentHTML-DocumentFragment-crash.html
inspector/debugger/setPauseOnExceptions-uncaught.html
fast/regions/selection/crash-deselect.html
inspector/debugger/regress-133182.html
inspector/debugger/setPauseOnExceptions-all.html
js/dom/reflect-set-onto-dom.html
fast/dom/Geolocation/not-enough-arguments.html
Comment 9 Build Bot 2016-05-17 09:02:24 PDT
Created attachment 279127 [details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 10 Build Bot 2016-05-17 09:09:02 PDT
Comment on attachment 279123 [details]
Fixing mac build

Attachment 279123 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1336934

New failing tests:
fast/dynamic/015.html
fast/inspector-support/uncaught-dom1-exception.html
editing/selection/caret-ltr-2-left.html
svg/dom/SVGTransformList.html
fast/dom/insertAdjacentHTML-DocumentFragment-crash.html
editing/selection/caret-rtl.html
fast/inspector-support/uncaught-dom8-exception.html
fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html
fast/inspector-support/uncaught-dom3-exception.html
crypto/crypto-random-values-types.html
editing/selection/caret-ltr.html
editing/selection/caret-ltr-2.html
fast/dom/Geolocation/argument-types.html
js/dom/reflect-set-onto-dom.html
editing/selection/caret-ltr-right.html
fast/regions/selection/crash-deselect.html
editing/selection/caret-rtl-2.html
editing/selection/caret-rtl-2-left.html
fast/dom/HTMLSelectElement/select-selectedIndex.html
editing/selection/caret-rtl-right.html
fast/dom/Geolocation/not-enough-arguments.html
Comment 11 Build Bot 2016-05-17 09:09:04 PDT
Created attachment 279129 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 12 Build Bot 2016-05-17 09:22:08 PDT
Comment on attachment 279123 [details]
Fixing mac build

Attachment 279123 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1336962

New failing tests:
fast/dynamic/015.html
fast/inspector-support/uncaught-dom1-exception.html
svg/dom/SVGTransformList.html
fast/dom/HTMLSelectElement/select-selectedIndex.html
inspector/debugger/setPauseOnExceptions-none.html
fast/inspector-support/uncaught-dom8-exception.html
fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html
fast/inspector-support/uncaught-dom3-exception.html
crypto/crypto-random-values-types.html
fast/dom/Geolocation/argument-types.html
fast/dom/insertAdjacentHTML-DocumentFragment-crash.html
inspector/debugger/setPauseOnExceptions-uncaught.html
fast/regions/selection/crash-deselect.html
inspector/debugger/regress-133182.html
inspector/debugger/setPauseOnExceptions-all.html
js/dom/reflect-set-onto-dom.html
fast/dom/Geolocation/not-enough-arguments.html
Comment 13 Build Bot 2016-05-17 09:22:11 PDT
Created attachment 279131 [details]
Archive of layout-test-results from ews113 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 14 youenn fablet 2016-05-17 13:01:38 PDT
Created attachment 279153 [details]
Rebasing tests
Comment 15 WebKit Commit Bot 2016-05-17 13:03:48 PDT
Attachment 279153 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/ExceptionCode.h:68:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:69:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:70:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:71:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:72:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:73:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:74:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:75:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:76:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/ExceptionCode.h:77:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 10 in 38 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 16 Build Bot 2016-05-17 13:59:50 PDT
Comment on attachment 279153 [details]
Rebasing tests

Attachment 279153 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1337988

New failing tests:
editing/selection/caret-ltr-2-left.html
editing/selection/caret-rtl.html
editing/selection/caret-ltr.html
editing/selection/caret-ltr-2.html
editing/selection/caret-ltr-right.html
editing/selection/caret-rtl-2.html
editing/selection/caret-rtl-2-left.html
editing/selection/caret-rtl-right.html
Comment 17 Build Bot 2016-05-17 13:59:53 PDT
Created attachment 279161 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 18 Build Bot 2016-05-17 15:52:28 PDT
Comment on attachment 279153 [details]
Rebasing tests

Attachment 279153 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1338432

Number of test failures exceeded the failure limit.
Comment 19 Build Bot 2016-05-17 15:52:33 PDT
Created attachment 279173 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 20 youenn fablet 2016-05-17 23:46:34 PDT
Created attachment 279222 [details]
Rebasing ios-sim tests
Comment 21 youenn fablet 2016-05-18 01:06:56 PDT
Patch is changing some error types for getUserMedia, WebRTC and HTML media element. I tried to follow the latest spec.
I don't think that this would cause compatibility issues, except maybe for getUserMedia.
Comment 22 Eric Carlson 2016-05-18 07:43:42 PDT
Comment on attachment 279222 [details]
Rebasing ios-sim tests

View in context: https://bugs.webkit.org/attachment.cgi?id=279222&action=review

> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:198
> +    // FIXME: The promise should be rejected with an OverconstrainedError.

Please file a bug and include the number here.

> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:-207
> -    // FIXME: Replace NavigatorUserMediaError with MediaStreamError (see bug 143335)
> -    m_promise.reject(NavigatorUserMediaError::create(NavigatorUserMediaError::permissionDeniedErrorName(), emptyString()));

Please close bug 143335 when this lands.
Comment 23 youenn fablet 2016-05-18 07:51:44 PDT
Created attachment 279249 [details]
Patch for landing
Comment 24 youenn fablet 2016-05-18 07:52:30 PDT
Thanks for the review.

> > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:198
> > +    // FIXME: The promise should be rejected with an OverconstrainedError.
> 
> Please file a bug and include the number here.

I filed bug 157839.

> > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:-207
> > -    // FIXME: Replace NavigatorUserMediaError with MediaStreamError (see bug 143335)
> > -    m_promise.reject(NavigatorUserMediaError::create(NavigatorUserMediaError::permissionDeniedErrorName(), emptyString()));
> 
> Please close bug 143335 when this lands.

OK.
Comment 25 WebKit Commit Bot 2016-05-18 08:21:40 PDT
Comment on attachment 279249 [details]
Patch for landing

Clearing flags on attachment: 279249

Committed r201080: <http://trac.webkit.org/changeset/201080>
Comment 26 WebKit Commit Bot 2016-05-18 08:21:46 PDT
All reviewed patches have been landed.  Closing bug.