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 cf99ae6d8e75834c0f01a683fccd0e3e3985c89b..7c386c885e46dd0a5c0b548cd3d184b0a093d25f 100644 |
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js |
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js |
@@ -18,8 +18,8 @@ let mockBarcodeDetectionReady = define( |
handle => this.bindingSet_.addBinding(this, handle)); |
} |
- detect(frame_data, width, height) { |
- let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0); |
+ detect(bitmap_data) { |
+ let receivedStruct = new Uint8Array(bitmap_data.pixel_data); |
this.buffer_data_ = new Uint32Array(receivedStruct.buffer); |
return Promise.resolve({ |
results: [ |
@@ -45,7 +45,6 @@ let mockBarcodeDetectionReady = define( |
}, |
], |
}); |
- mojo.unmapBuffer(receivedStruct.buffer); |
} |
getFrameData() { |