Bug 201514 - Web Inspector: Crashes when intercept response is a 404
Summary: Web Inspector: Crashes when intercept response is a 404
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-05 13:58 PDT by Joseph Pecoraro
Modified: 2019-09-06 01:24 PDT (History)
4 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (7.74 KB, patch)
2019-09-05 13:59 PDT, Joseph Pecoraro
achristensen: review+
achristensen: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2019-09-05 13:58:09 PDT
Web Inspector: Crashes when intercept response is a 404

Seems like the WebResourceLoader can sometimes go away and m_coreLoader may have gone away if the response is 400s.
Comment 1 Joseph Pecoraro 2019-09-05 13:59:21 PDT
Created attachment 378117 [details]
[PATCH] Proposed Fix
Comment 2 Alex Christensen 2019-09-05 16:48:07 PDT
Comment on attachment 378117 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=378117&action=review

> Source/WebKit/WebProcess/Network/WebResourceLoader.cpp:147
> +        Ref<WebResourceLoader> interceptProtectedThis(*this);

Please just call it protectedThis, and do it in the lambda capture:
protectedThis = makeRef(*this)
Comment 3 Joseph Pecoraro 2019-09-05 19:54:04 PDT
(In reply to Alex Christensen from comment #2)
> Comment on attachment 378117 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=378117&action=review
> 
> > Source/WebKit/WebProcess/Network/WebResourceLoader.cpp:147
> > +        Ref<WebResourceLoader> interceptProtectedThis(*this);
> 
> Please just call it protectedThis, and do it in the lambda capture:
> protectedThis = makeRef(*this)

There is already a `protectedThis` that may or may not be moved, which is why this is named separately.
Comment 4 Joseph Pecoraro 2019-09-05 19:54:49 PDT
> > Please just call it protectedThis, and do it in the lambda capture:
> > protectedThis = makeRef(*this)
> 
> There is already a `protectedThis` that may or may not be moved, which is
> why this is named separately.

But I should be able to use that name again in the new lambdas.
Comment 5 Joseph Pecoraro 2019-09-06 01:23:21 PDT
https://trac.webkit.org/changeset/249567/webkit
Comment 6 Radar WebKit Bug Importer 2019-09-06 01:24:16 PDT
<rdar://problem/55104293>