diff --git a/ReactCommon/fabric/imagemanager/ImageRequest.h b/ReactCommon/fabric/imagemanager/ImageRequest.h index 52a1d0141d7..1a84a1833d2 100644 --- a/ReactCommon/fabric/imagemanager/ImageRequest.h +++ b/ReactCommon/fabric/imagemanager/ImageRequest.h @@ -41,8 +41,6 @@ class ImageRequest final { const ImageSource &imageSource, folly::Future &&responseFuture); - ImageRequest(); - /* * The move constructor. */ diff --git a/ReactCommon/fabric/imagemanager/platform/android/ImageManager.cpp b/ReactCommon/fabric/imagemanager/platform/android/ImageManager.cpp index 6c81c831b63..4221aac1e20 100644 --- a/ReactCommon/fabric/imagemanager/platform/android/ImageManager.cpp +++ b/ReactCommon/fabric/imagemanager/platform/android/ImageManager.cpp @@ -20,7 +20,7 @@ ImageManager::~ImageManager() { ImageRequest ImageManager::requestImage(const ImageSource &imageSource) const { // Not implemented. - return {}; + abort(); } } // namespace react diff --git a/ReactCommon/fabric/imagemanager/platform/android/ImageRequest.cpp b/ReactCommon/fabric/imagemanager/platform/android/ImageRequest.cpp new file mode 100644 index 00000000000..ec88e317028 --- /dev/null +++ b/ReactCommon/fabric/imagemanager/platform/android/ImageRequest.cpp @@ -0,0 +1,35 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include "ImageRequest.h" + +namespace facebook { +namespace react { + +ImageRequest::ImageRequest( + const ImageSource &imageSource, + folly::Future &&responseFuture) { + // Not implemented. +} + +ImageRequest::ImageRequest(ImageRequest &&other) noexcept + : imageSource_(std::move(other.imageSource_)), + responseFutureSplitter_(std::move(other.responseFutureSplitter_)) { + // Not implemented. +} + +ImageRequest::~ImageRequest() { + // Not implemented. +} + +folly::Future ImageRequest::getResponseFuture() const { + // Not implemented. + abort(); +} + +} // namespace react +} // namespace facebook diff --git a/ReactCommon/fabric/imagemanager/ImageRequest.cpp b/ReactCommon/fabric/imagemanager/platform/ios/ImageRequest.cpp similarity index 97% rename from ReactCommon/fabric/imagemanager/ImageRequest.cpp rename to ReactCommon/fabric/imagemanager/platform/ios/ImageRequest.cpp index d2fd32f92c8..afa6cb3bd92 100644 --- a/ReactCommon/fabric/imagemanager/ImageRequest.cpp +++ b/ReactCommon/fabric/imagemanager/platform/ios/ImageRequest.cpp @@ -16,8 +16,6 @@ class ImageRequest::ImageNoLongerNeededException : public std::logic_error { : std::logic_error("Image no longer needed.") {} }; -ImageRequest::ImageRequest() {} - ImageRequest::ImageRequest( const ImageSource &imageSource, folly::Future &&responseFuture)