WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
234002
Copy ServiceWorkerNavigationPreloader error when failing its ServiceWorkerFetchTask
https://bugs.webkit.org/show_bug.cgi?id=234002
Summary
Copy ServiceWorkerNavigationPreloader error when failing its ServiceWorkerFet...
youenn fablet
Reported
2021-12-08 06:20:49 PST
Copy ServiceWorkerNavigationPreloader error when failing its ServiceWorkerFetchTask
Attachments
Patch
(2.00 KB, patch)
2021-12-08 06:25 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2021-12-08 06:25:11 PST
Created
attachment 446356
[details]
Patch
Chris Dumez
Comment 2
2021-12-08 07:34:37 PST
Comment on
attachment 446356
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=446356&action=review
> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:370 > if (!m_preloader->error().isNull()) {
Maybe this would look better? ``` if (auto error = m_preloader->error(); !error.isNull()) { didFail(error); return; } ```
> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:397 > + didFail(ResourceError { m_preloader->error() });
ditto.
youenn fablet
Comment 3
2021-12-08 08:07:36 PST
Comment on
attachment 446356
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=446356&action=review
>> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:370 >> if (!m_preloader->error().isNull()) { > > Maybe this would look better? > ``` > if (auto error = m_preloader->error(); !error.isNull()) { > didFail(error); > return; > } > ```
I am not sure, I would tend to leave the comment in any case. With your proposal, we would always copy the error, though a null error copy y is probably very cheap. Another approach is to return a ResourceError and not a const ResourceError&, or a std::optional<ResourceError>.
EWS
Comment 4
2021-12-09 03:43:51 PST
Committed
r286774
(
245015@main
): <
https://commits.webkit.org/245015@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 446356
[details]
.
Radar WebKit Bug Importer
Comment 5
2021-12-09 03:44:27 PST
<
rdar://problem/86263771
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug