void CacheOpChild::HandleResponse(const CacheResponseOrVoid& aResponseOrVoid) { if (aResponseOrVoid.type() == CacheResponseOrVoid::Tvoid_t) { mPromise->MaybeResolveWithUndefined(); return; } const CacheResponse& cacheResponse = aResponseOrVoid.get_CacheResponse(); AddWorkerHolderToStreamChild(cacheResponse, GetWorkerHolder()); RefPtr<Response> response = ToResponse(cacheResponse); mPromise->MaybeResolve(response); }
void CacheOpChild::HandleResponse(const CacheResponseOrVoid& aResponseOrVoid) { if (aResponseOrVoid.type() == CacheResponseOrVoid::Tvoid_t) { mPromise->MaybeResolve(JS::UndefinedHandleValue); return; } const CacheResponse& cacheResponse = aResponseOrVoid.get_CacheResponse(); AddFeatureToStreamChild(cacheResponse, GetFeature()); RefPtr<Response> response = ToResponse(cacheResponse); mPromise->MaybeResolve(response); }