summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/shapedetection/face_detector.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/shapedetection/face_detector.cc')
-rw-r--r--chromium/third_party/blink/renderer/modules/shapedetection/face_detector.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chromium/third_party/blink/renderer/modules/shapedetection/face_detector.cc b/chromium/third_party/blink/renderer/modules/shapedetection/face_detector.cc
index e702c47f481..991dea9d475 100644
--- a/chromium/third_party/blink/renderer/modules/shapedetection/face_detector.cc
+++ b/chromium/third_party/blink/renderer/modules/shapedetection/face_detector.cc
@@ -50,8 +50,9 @@ ScriptPromise FaceDetector::DoDetect(ScriptPromiseResolver* resolver,
SkBitmap bitmap) {
ScriptPromise promise = resolver->Promise();
if (!face_service_) {
- resolver->Reject(DOMException::Create(
- kNotSupportedError, "Face detection service unavailable."));
+ resolver->Reject(
+ DOMException::Create(DOMExceptionCode::kNotSupportedError,
+ "Face detection service unavailable."));
return promise;
}
face_service_requests_.insert(resolver);
@@ -88,8 +89,9 @@ void FaceDetector::OnDetectFaces(
}
detected_faces.push_back(DetectedFace::Create(
- DOMRect::Create(face->bounding_box.x, face->bounding_box.y,
- face->bounding_box.width, face->bounding_box.height),
+ DOMRectReadOnly::Create(face->bounding_box.x, face->bounding_box.y,
+ face->bounding_box.width,
+ face->bounding_box.height),
landmarks));
}
@@ -98,7 +100,7 @@ void FaceDetector::OnDetectFaces(
void FaceDetector::OnFaceServiceConnectionError() {
for (const auto& request : face_service_requests_) {
- request->Reject(DOMException::Create(kNotSupportedError,
+ request->Reject(DOMException::Create(DOMExceptionCode::kNotSupportedError,
"Face Detection not implemented."));
}
face_service_requests_.clear();