Bug 160192 - Binding generator should expose the visible interface name in error messages
Summary: Binding generator should expose the visible interface name in error messages
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-07-26 03:56 PDT by youenn fablet
Modified: 2016-07-28 23:46 PDT (History)
8 users (show)

See Also:


Attachments
Patch (185.66 KB, patch)
2016-07-26 04:01 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (184.60 KB, patch)
2016-07-26 04:22 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-yosemite (864.80 KB, application/zip)
2016-07-26 05:13 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (883.98 KB, application/zip)
2016-07-26 05:16 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (673.08 KB, application/zip)
2016-07-26 05:24 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews117 for mac-yosemite (1.50 MB, application/zip)
2016-07-26 05:27 PDT, Build Bot
no flags Details
Rebasing tests (202.91 KB, patch)
2016-07-26 08:13 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Adding FetchRequest test (204.35 KB, patch)
2016-07-28 02:34 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-07-26 03:56:18 PDT
Currently the binding generator is generating error messages with the interface name, which may be different from the name exposed to scripts.
Comment 1 youenn fablet 2016-07-26 04:01:08 PDT
Created attachment 284572 [details]
Patch
Comment 2 youenn fablet 2016-07-26 04:22:20 PDT
Created attachment 284576 [details]
Patch
Comment 3 Build Bot 2016-07-26 05:13:40 PDT
Comment on attachment 284576 [details]
Patch

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

New failing tests:
media/encrypted-media/encrypted-media-v2-syntax.html
fast/dom/Window/getComputedStyle-missing-parameter.html
js/getOwnPropertyDescriptor-window-attributes.html
js/dom/toString-and-valueOf-override.html
webaudio/mediaelementaudiosourcenode.html
editing/selection/extend.html
webaudio/decode-audio-data-basic.html
webaudio/createMediaStreamSource-null.html
js/getOwnPropertyDescriptor-unforgeable-attributes.html
Comment 4 Build Bot 2016-07-26 05:13:45 PDT
Created attachment 284579 [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 5 Build Bot 2016-07-26 05:16:55 PDT
Comment on attachment 284576 [details]
Patch

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

New failing tests:
media/encrypted-media/encrypted-media-v2-syntax.html
fast/dom/Window/getComputedStyle-missing-parameter.html
js/getOwnPropertyDescriptor-window-attributes.html
js/dom/toString-and-valueOf-override.html
webaudio/decode-audio-data-basic.html
editing/selection/extend.html
webaudio/mediaelementaudiosourcenode.html
webaudio/createMediaStreamSource-null.html
js/getOwnPropertyDescriptor-unforgeable-attributes.html
Comment 6 Build Bot 2016-07-26 05:16:58 PDT
Created attachment 284580 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-07-26 05:24:49 PDT
Comment on attachment 284576 [details]
Patch

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

New failing tests:
editing/selection/extend.html
js/getOwnPropertyDescriptor-window-attributes.html
fast/dom/Window/getComputedStyle-missing-parameter.html
js/getOwnPropertyDescriptor-unforgeable-attributes.html
js/dom/toString-and-valueOf-override.html
Comment 8 Build Bot 2016-07-26 05:24:52 PDT
Created attachment 284581 [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.5
Comment 9 Build Bot 2016-07-26 05:27:03 PDT
Comment on attachment 284576 [details]
Patch

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

New failing tests:
media/encrypted-media/encrypted-media-v2-syntax.html
fast/dom/Window/getComputedStyle-missing-parameter.html
js/getOwnPropertyDescriptor-window-attributes.html
js/dom/toString-and-valueOf-override.html
webaudio/decode-audio-data-basic.html
editing/selection/extend.html
webaudio/mediaelementaudiosourcenode.html
webaudio/createMediaStreamSource-null.html
js/getOwnPropertyDescriptor-unforgeable-attributes.html
Comment 10 Build Bot 2016-07-26 05:27:06 PDT
Created attachment 284582 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 11 youenn fablet 2016-07-26 08:13:20 PDT
Created attachment 284590 [details]
Rebasing tests
Comment 12 Alex Christensen 2016-07-27 23:28:47 PDT
Comment on attachment 284590 [details]
Rebasing tests

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

What's the motivation for this change?

> LayoutTests/media/encrypted-media/encrypted-media-v2-syntax-expected.txt:25
> -TEST(mediaKeySession.update(null)) THROWS('TypeError: Argument 1 (\'key\') to MediaKeySession.update must be an instance of Uint8Array') OK
> +TEST(mediaKeySession.update(null)) THROWS('TypeError: Argument 1 (\'key\') to webkitMediaKeySession.update must be an instance of Uint8Array') FAIL

This OK to FAIL doesn't look good.
Comment 13 youenn fablet 2016-07-27 23:35:02 PDT
(In reply to comment #12)
> Comment on attachment 284590 [details]
> Rebasing tests
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=284590&action=review
> 
> What's the motivation for this change?

Improve error message quality.
Using FetchRequest or FetchResponse is misleading for web developers.
We should use Request or Response.

> 
> > LayoutTests/media/encrypted-media/encrypted-media-v2-syntax-expected.txt:25
> > -TEST(mediaKeySession.update(null)) THROWS('TypeError: Argument 1 (\'key\') to MediaKeySession.update must be an instance of Uint8Array') OK
> > +TEST(mediaKeySession.update(null)) THROWS('TypeError: Argument 1 (\'key\') to webkitMediaKeySession.update must be an instance of Uint8Array') FAIL
> 
> This OK to FAIL doesn't look good.

Right, the first letter should be capital W.
Comment 14 Alex Christensen 2016-07-28 00:16:42 PDT
(In reply to comment #13)
> > What's the motivation for this change?
> 
> Improve error message quality.
> Using FetchRequest or FetchResponse is misleading for web developers.
> We should use Request or Response.
Can this be shown in a layout test?
Comment 15 youenn fablet 2016-07-28 00:20:25 PDT
(In reply to comment #14)
> (In reply to comment #13)
> > > What's the motivation for this change?
> > 
> > Improve error message quality.
> > Using FetchRequest or FetchResponse is misleading for web developers.
> > We should use Request or Response.
> Can this be shown in a layout test?

There is one test in fetch/fetch-error-messages.hrml.
JS built-ins fetch API correctly use "Request"/"Response".
But binding generated code does not.

If that helps, I can add another test in that file to exercice this for binding generated methods.
That said, this is somehow redundant with all rebased tests in terms of non-regression.
Comment 16 youenn fablet 2016-07-28 02:34:50 PDT
Created attachment 284763 [details]
Adding FetchRequest test
Comment 17 WebKit Commit Bot 2016-07-28 23:46:36 PDT
Comment on attachment 284763 [details]
Adding FetchRequest test

Clearing flags on attachment: 284763

Committed r203858: <http://trac.webkit.org/changeset/203858>
Comment 18 WebKit Commit Bot 2016-07-28 23:46:44 PDT
All reviewed patches have been landed.  Closing bug.