Bug 170121 - webkitpy: Use host pattern for devices
Summary: webkitpy: Use host pattern for devices
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-27 10:49 PDT by Jonathan Bedard
Modified: 2017-03-28 07:06 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.11 KB, patch)
2017-03-27 10:51 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (5.82 KB, patch)
2017-03-27 15:03 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2017-03-27 10:49:49 PDT
To maximize code re-use, devices should have all of the same qualities as a host object, allowing devices to be passed to functions expecting a host.
Comment 1 Jonathan Bedard 2017-03-27 10:51:16 PDT
Created attachment 305484 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2017-03-27 10:51:29 PDT
<rdar://problem/31277095>
Comment 3 Daniel Bates 2017-03-27 14:20:29 PDT
Comment on attachment 305484 [details]
Patch

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

> Tools/ChangeLog:9
> +        throughout webkitpy.  Add the needed properties and

This sentence does not read well.

> Tools/Scripts/webkitpy/port/device.py:36
> +        try:

Is it necessary to use a try-catch? I do not see the harm in having a Python exception thrown if this property does not exist in the platform device. Such an exception would tell us either that we need to implement this functionality or that the caller must conditionalize the call to this property.

> Tools/Scripts/webkitpy/port/device.py:43
> +        try:

Ditto.

> Tools/Scripts/webkitpy/port/device.py:50
> +        try:

Ditto

> Tools/Scripts/webkitpy/port/device.py:57
> +        try:

Ditto.

> Tools/Scripts/webkitpy/port/device.py:64
> +        try:

Ditto.
Comment 4 Jonathan Bedard 2017-03-27 15:03:42 PDT
Created attachment 305516 [details]
Patch
Comment 5 WebKit Commit Bot 2017-03-28 07:06:53 PDT
Comment on attachment 305516 [details]
Patch

Clearing flags on attachment: 305516

Committed r214473: <http://trac.webkit.org/changeset/214473>
Comment 6 WebKit Commit Bot 2017-03-28 07:06:57 PDT
All reviewed patches have been landed.  Closing bug.