WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 165641
156853
Remove WebCore::Dictionary and use WebCore::JSDictionary directly instead
https://bugs.webkit.org/show_bug.cgi?id=156853
Summary
Remove WebCore::Dictionary and use WebCore::JSDictionary directly instead
Darin Adler
Reported
2016-04-21 09:27:34 PDT
Remove WebCore::Dictionary and use WebCore::JSDictionary directly instead
Attachments
Patch
(146.04 KB, patch)
2016-04-21 22:51 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews117 for mac-yosemite
(1.31 MB, application/zip)
2016-04-22 00:00 PDT
,
Build Bot
no flags
Details
Patch
(147.38 KB, patch)
2016-04-24 22:41 PDT
,
Darin Adler
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-yosemite
(1.27 MB, application/zip)
2016-04-24 23:30 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews107 for mac-yosemite-wk2
(1.18 MB, application/zip)
2016-04-24 23:34 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews126 for ios-simulator-wk2
(911.85 KB, application/zip)
2016-04-24 23:47 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews113 for mac-yosemite
(1.31 MB, application/zip)
2016-04-24 23:56 PDT
,
Build Bot
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2016-04-21 22:51:56 PDT
Created
attachment 277011
[details]
Patch
Darin Adler
Comment 2
2016-04-21 23:18:08 PDT
Comment on
attachment 277011
[details]
Patch Missing some includes of JSCJSValueInlines.h, I think.
Build Bot
Comment 3
2016-04-21 23:59:58 PDT
Comment on
attachment 277011
[details]
Patch
Attachment 277011
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1200338
Number of test failures exceeded the failure limit.
Build Bot
Comment 4
2016-04-22 00:00:01 PDT
Created
attachment 277013
[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
Darin Adler
Comment 5
2016-04-24 22:41:54 PDT
Created
attachment 277217
[details]
Patch
Build Bot
Comment 6
2016-04-24 23:30:54 PDT
Comment on
attachment 277217
[details]
Patch
Attachment 277217
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1216171
Number of test failures exceeded the failure limit.
Build Bot
Comment 7
2016-04-24 23:30:57 PDT
Created
attachment 277225
[details]
Archive of layout-test-results from ews100 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 8
2016-04-24 23:34:11 PDT
Comment on
attachment 277217
[details]
Patch
Attachment 277217
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1216175
Number of test failures exceeded the failure limit.
Build Bot
Comment 9
2016-04-24 23:34:15 PDT
Created
attachment 277227
[details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Alexey Proskuryakov
Comment 10
2016-04-24 23:41:57 PDT
Comment on
attachment 277217
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=277217&action=review
> Source/WebCore/ChangeLog:21 > + Longer term the direction should be to remove almost all direct use of > + JSDictionary in the C++ DOM and move it to the bindings. I have some specific > + ideas of how to do this; we should use have the bindings translate the > + dictionaries into structs defined in the C++ DOM.
From a discussion when I was implementing WebCrypto, I remember that having a separate class for Dictionary was the first step in this direction. I can't compare the approaches deeply enough, really interested in Sam's take.
Build Bot
Comment 11
2016-04-24 23:47:00 PDT
Comment on
attachment 277217
[details]
Patch
Attachment 277217
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1216193
Number of test failures exceeded the failure limit.
Build Bot
Comment 12
2016-04-24 23:47:04 PDT
Created
attachment 277228
[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Build Bot
Comment 13
2016-04-24 23:56:19 PDT
Comment on
attachment 277217
[details]
Patch
Attachment 277217
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1216194
Number of test failures exceeded the failure limit.
Build Bot
Comment 14
2016-04-24 23:56:22 PDT
Created
attachment 277229
[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
Darin Adler
Comment 15
2016-04-25 08:53:28 PDT
(In reply to
comment #10
)
> > + Longer term the direction should be to remove almost all direct use of > > + JSDictionary in the C++ DOM and move it to the bindings. I have some specific > > + ideas of how to do this; we should use have the bindings translate the > > + dictionaries into structs defined in the C++ DOM. > > From a discussion when I was implementing WebCrypto, I remember that having > a separate class for Dictionary was the first step in this direction.
My approach will involve a structure for each dictionary, defined in the C++ DOM, and bindings translating the dictionary to the structure before calling the C++ DOM. You’ll start to see it in patches over the next weeks or months and we can discuss it either then or before then.
Chris Dumez
Comment 16
2016-05-01 10:03:26 PDT
(In reply to
comment #15
)
> (In reply to
comment #10
) > > > + Longer term the direction should be to remove almost all direct use of > > > + JSDictionary in the C++ DOM and move it to the bindings. I have some specific > > > + ideas of how to do this; we should use have the bindings translate the > > > + dictionaries into structs defined in the C++ DOM. > > > > From a discussion when I was implementing WebCrypto, I remember that having > > a separate class for Dictionary was the first step in this direction. > > My approach will involve a structure for each dictionary, defined in the C++ > DOM, and bindings translating the dictionary to the structure before calling > the C++ DOM. You’ll start to see it in patches over the next weeks or months > and we can discuss it either then or before then.
The one issue I see using a struct is that Dictionaries passed in from JS often have very few of their members defined. Dictionaries are usually used a bags of options/settings and the JS often specifies just one of them. The issue with using a struct for this is that it will always have all its members. Likely, most of the members will be using WTF::Optional<> since dictionary members are almost always optional. It may look a bit awkward to use a struct for this. The nice thing about converting to a struct in the bindings is that it will take care of all the input validation and type conversion for us. This part is great.
Darin Adler
Comment 17
2016-05-01 16:26:24 PDT
(In reply to
comment #16
)
> Likely, most of the members will be using WTF::Optional<> since > dictionary members are almost always optional.
Unless there is a default value for that item in the dictionary. The situation is quite similar to method arguments.
Chris Dumez
Comment 18
2016-05-01 16:49:15 PDT
(In reply to
comment #17
)
> (In reply to
comment #16
) > > Likely, most of the members will be using WTF::Optional<> since > > dictionary members are almost always optional. > > Unless there is a default value for that item in the dictionary. The > situation is quite similar to method arguments.
Good point, I did not think about this.
Darin Adler
Comment 19
2016-11-11 08:59:36 PST
Still good to have both WebCore::Dictionary and WebCore::JSDictionary. We need to delete one or the other. In the mean time, we removed many uses of WebCore::Dictionary.
Darin Adler
Comment 20
2016-12-09 21:27:29 PST
*** This bug has been marked as a duplicate of
bug 165641
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug