Bug 162734 - Bindings do not throw a TypeError if a required dictionary member is missing
Summary: Bindings do not throw a TypeError if a required dictionary member is missing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://heycam.github.io/webidl/#es-d...
Keywords: WebExposed
Depends on:
Blocks: 147740
  Show dependency treegraph
 
Reported: 2016-09-29 10:37 PDT by Chris Dumez
Modified: 2016-10-03 23:31 PDT (History)
8 users (show)

See Also:


Attachments
Patch (45.54 KB, patch)
2016-10-03 12:04 PDT, Chris Dumez
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (759.61 KB, application/zip)
2016-10-03 12:33 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (579.81 KB, application/zip)
2016-10-03 12:49 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-yosemite (484.92 KB, application/zip)
2016-10-03 12:52 PDT, Build Bot
no flags Details
Patch (43.21 KB, patch)
2016-10-03 13:38 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (44.86 KB, patch)
2016-10-03 13:52 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-09-29 10:37:25 PDT
Bindings do not throw a TypeError if a required dictionary member is missing.

For example, if there is a "required long id" member in a dictionary, and it is missing. Our bindings will currently pass 0 to the implementation instead of throwing a TypeError.
Comment 1 Chris Dumez 2016-10-03 09:25:05 PDT
Relevant spec:
https://heycam.github.io/webidl/#es-dictionary
Comment 2 Chris Dumez 2016-10-03 10:31:17 PDT
I am working on fixing this.
Comment 3 Chris Dumez 2016-10-03 12:04:49 PDT
Created attachment 290501 [details]
Patch
Comment 4 Darin Adler 2016-10-03 12:20:18 PDT
Comment on attachment 290501 [details]
Patch

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

> Source/WebCore/ChangeLog:17
> +        except for the support for dictionary inheritence that is still missing

spelling error: inheritance
Comment 5 Build Bot 2016-10-03 12:33:43 PDT
Comment on attachment 290501 [details]
Patch

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

Number of test failures exceeded the failure limit.
Comment 6 Build Bot 2016-10-03 12:33:47 PDT
Created attachment 290505 [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 7 Build Bot 2016-10-03 12:49:30 PDT
Comment on attachment 290501 [details]
Patch

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

Number of test failures exceeded the failure limit.
Comment 8 Build Bot 2016-10-03 12:49:33 PDT
Created attachment 290507 [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 9 Build Bot 2016-10-03 12:52:21 PDT
Comment on attachment 290501 [details]
Patch

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

Number of test failures exceeded the failure limit.
Comment 10 Build Bot 2016-10-03 12:52:25 PDT
Created attachment 290508 [details]
Archive of layout-test-results from ews112 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 11 Chris Dumez 2016-10-03 13:38:22 PDT
Created attachment 290512 [details]
Patch
Comment 12 Chris Dumez 2016-10-03 13:52:55 PDT
Created attachment 290516 [details]
Patch
Comment 13 Geoffrey Garen 2016-10-03 23:09:06 PDT
Comment on attachment 290516 [details]
Patch

r=me
Comment 14 WebKit Commit Bot 2016-10-03 23:31:23 PDT
Comment on attachment 290516 [details]
Patch

Clearing flags on attachment: 290516

Committed r206766: <http://trac.webkit.org/changeset/206766>
Comment 15 WebKit Commit Bot 2016-10-03 23:31:30 PDT
All reviewed patches have been landed.  Closing bug.