| Index: third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
|
| diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
|
| index 1f6a479d8c22017486e0e4dbb35c089b4cb6e393..5bc404e81e8b76fd7ebe6cc2dc8c44a9d10a783d 100644
|
| --- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
|
| +++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
|
| @@ -4,9 +4,8 @@ let mockBarcodeDetectionReady = define(
|
| 'mockBarcodeDetection',
|
| ['services/shape_detection/public/interfaces/barcodedetection.mojom',
|
| 'mojo/public/js/bindings',
|
| - 'mojo/public/js/core',
|
| 'content/public/renderer/interfaces',
|
| - ], (barcodeDetection, bindings, mojo, interfaces) => {
|
| + ], (barcodeDetection, bindings, interfaces) => {
|
|
|
| class MockBarcodeDetection {
|
| constructor() {
|
| @@ -19,7 +18,7 @@ let mockBarcodeDetectionReady = define(
|
| }
|
|
|
| detect(frame_data, width, height) {
|
| - let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0);
|
| + let receivedStruct = frame_data.mapBuffer(0, width*height*4);
|
| this.buffer_data_ = new Uint32Array(receivedStruct.buffer);
|
| return Promise.resolve({
|
| results: [
|
| @@ -45,7 +44,6 @@ let mockBarcodeDetectionReady = define(
|
| },
|
| ],
|
| });
|
| - mojo.unmapBuffer(receivedStruct.buffer);
|
| }
|
|
|
| getFrameData() {
|
|
|