|
|
Chromium Code Reviews|
Created:
4 years ago by mcasas Modified:
4 years ago CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, jam, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, xianglu, yzshen+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionBarcode/Face detection: reject requests in platforms where not implemented
This CL adds on_connection_error listeners to the mojo interface
pointers used for face/barcode detection. The connection error
handler is used to reject all Promises related to the given interface,
otherwise requests from Blink are neither resolved nor rejected (see bug).
BUG=668343
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/62beea5d8166bee43361033475448a0a08cd5bfa
Cr-Commit-Position: refs/heads/master@{#435484}
Patch Set 1 : #Patch Set 2 : Reject promises if mojo connection error #
Total comments: 4
Patch Set 3 : reillyg@s comments #
Total comments: 4
Patch Set 4 : moar comments #
Messages
Total messages: 31 (18 generated)
Description was changed from ========== Barcode/Face detection: add dummy intf impl rejecting requests in platforms where not implemented BUG=668343 ========== to ========== Barcode/Face detection: add dummy intf impl rejecting requests in platforms where not implemented BUG=668343 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation ==========
Patchset #2 (id:20001) has been deleted
Patchset #1 (id:1) has been deleted
The CQ bit was checked by mcasas@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
Description was changed from
==========
Barcode/Face detection: add dummy intf impl rejecting requests in platforms
where not implemented
BUG=668343
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
to
==========
Barcode/Face detection: add interface impl rejecting requests in platforms where
not implemented
This CL adds a dummy {Barcode/Face}DetectionImpl in browser to be
used in platforms where there is no meaningful implementation,
otherwise requests from Blink are neither resolved nor rejected (see bug).
To convey the meaning of "not implemented", a new optional
field is added to the mojo response. Since mojo cannot make
primitive types optional, the enum DetectionErrorType is wrapped
in a mojo Struct (similar to what nfc.mojom does [1]).
[1]
https://cs.chromium.org/chromium/src/device/nfc/nfc.mojom?q=nfc.mojom&sq=pack...
BUG=668343
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
mcasas@chromium.org changed reviewers: + reillyg@chromium.org
reillyg@ PTAL
As discussed OOB mcasas@ will investigate adding a connection error handler to the Blink side to detect when the pipe is closed to report the "not supported" error.
Description was changed from
==========
Barcode/Face detection: add interface impl rejecting requests in platforms where
not implemented
This CL adds a dummy {Barcode/Face}DetectionImpl in browser to be
used in platforms where there is no meaningful implementation,
otherwise requests from Blink are neither resolved nor rejected (see bug).
To convey the meaning of "not implemented", a new optional
field is added to the mojo response. Since mojo cannot make
primitive types optional, the enum DetectionErrorType is wrapped
in a mojo Struct (similar to what nfc.mojom does [1]).
[1]
https://cs.chromium.org/chromium/src/device/nfc/nfc.mojom?q=nfc.mojom&sq=pack...
BUG=668343
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
to
==========
Barcode/Face detection: reject requests in platforms where not implemented
This CL adds on_connection_error listeners to the mojo interface
pointers used for face/barcode detection. The connection error
handler is used to reject all Promises related to the given interface,
otherwise requests from Blink are neither resolved nor rejected (see bug).
BUG=668343
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
reillyg@ PTAL
https://codereview.chromium.org/2538053002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2538053002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:174: DCHECK(m_faceService); We should still have the code to reject the promise here. https://codereview.chromium.org/2538053002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:373: m_faceServiceRequests.clear(); Reset m_faceService so that code above knows the connection has be closed. You only get one connection error.
ptal https://codereview.chromium.org/2538053002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2538053002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:174: DCHECK(m_faceService); On 2016/11/30 21:43:28, Reilly Grant wrote: > We should still have the code to reject the promise here. Done. https://codereview.chromium.org/2538053002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:373: m_faceServiceRequests.clear(); On 2016/11/30 21:43:28, Reilly Grant wrote: > Reset m_faceService so that code above knows the connection has be closed. You > only get one connection error. Done.
https://codereview.chromium.org/2538053002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2538053002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:351: if (!m_faceServiceRequests.contains(resolver)) I think this can be a DCHECK. The reason we have this check in WebUSB is because the request sets get cleared when the ExecutionContext is destroyed. I don't think that's actually really necessary anymore. https://codereview.chromium.org/2538053002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:368: if (!m_barcodeServiceRequests.contains(resolver)) Ditto.
https://codereview.chromium.org/2538053002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp (right): https://codereview.chromium.org/2538053002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:351: if (!m_faceServiceRequests.contains(resolver)) On 2016/11/30 21:58:47, Reilly Grant wrote: > I think this can be a DCHECK. The reason we have this check in WebUSB is because > the request sets get cleared when the ExecutionContext is destroyed. I don't > think that's actually really necessary anymore. Done. https://codereview.chromium.org/2538053002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp:368: if (!m_barcodeServiceRequests.contains(resolver)) On 2016/11/30 21:58:47, Reilly Grant wrote: > Ditto. Done.
lgtm
mcasas@chromium.org changed reviewers: + haraken@chromium.org
haraken@ RS plz.
The CQ bit was checked by mcasas@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM
The CQ bit was unchecked by mcasas@chromium.org
The CQ bit was checked by mcasas@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 100001, "attempt_start_ts": 1480548979029080,
"parent_rev": "9a7d0bddc71964fa8d0adbffbc5d5a8d9a0ea6ab", "commit_rev":
"95e5e78ce4f17f8dc15a193557a84997357a5bc7"}
Message was sent while issue was closed.
Description was changed from ========== Barcode/Face detection: reject requests in platforms where not implemented This CL adds on_connection_error listeners to the mojo interface pointers used for face/barcode detection. The connection error handler is used to reject all Promises related to the given interface, otherwise requests from Blink are neither resolved nor rejected (see bug). BUG=668343 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation ========== to ========== Barcode/Face detection: reject requests in platforms where not implemented This CL adds on_connection_error listeners to the mojo interface pointers used for face/barcode detection. The connection error handler is used to reject all Promises related to the given interface, otherwise requests from Blink are neither resolved nor rejected (see bug). BUG=668343 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation ==========
Message was sent while issue was closed.
Committed patchset #4 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Barcode/Face detection: reject requests in platforms where not implemented This CL adds on_connection_error listeners to the mojo interface pointers used for face/barcode detection. The connection error handler is used to reject all Promises related to the given interface, otherwise requests from Blink are neither resolved nor rejected (see bug). BUG=668343 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation ========== to ========== Barcode/Face detection: reject requests in platforms where not implemented This CL adds on_connection_error listeners to the mojo interface pointers used for face/barcode detection. The connection error handler is used to reject all Promises related to the given interface, otherwise requests from Blink are neither resolved nor rejected (see bug). BUG=668343 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/62beea5d8166bee43361033475448a0a08cd5bfa Cr-Commit-Position: refs/heads/master@{#435484} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/62beea5d8166bee43361033475448a0a08cd5bfa Cr-Commit-Position: refs/heads/master@{#435484} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
