Bug 143414 - [Content Filtering] Tell the filter about requests and redirects
Summary: [Content Filtering] Tell the filter about requests and redirects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks: 128858 143460
  Show dependency treegraph
 
Reported: 2015-04-05 01:59 PDT by Andy Estes
Modified: 2015-04-06 17:31 PDT (History)
7 users (show)

See Also:


Attachments
Patch (27.35 KB, patch)
2015-04-05 02:15 PDT, Andy Estes
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2015-04-05 01:59:37 PDT
[Content Filtering] Tell the filter about requests and redirects
Comment 1 Andy Estes 2015-04-05 02:01:08 PDT
rdar://problem/19239549
Comment 2 Andy Estes 2015-04-05 02:15:13 PDT
Created attachment 250153 [details]
Patch
Comment 3 WebKit Commit Bot 2015-04-05 02:17:45 PDT
Attachment 250153 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm:85:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 30 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Darin Adler 2015-04-05 13:15:19 PDT
Comment on attachment 250153 [details]
Patch

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

> Source/WebCore/loader/DocumentLoader.cpp:541
> +        ASSERT(!newRequest.isNull());

Why do we assert this rather than handling this and having it cause cancellation/failure?
Comment 5 Andy Estes 2015-04-05 13:38:39 PDT
Comment on attachment 250153 [details]
Patch

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

>> Source/WebCore/loader/DocumentLoader.cpp:541
>> +        ASSERT(!newRequest.isNull());
> 
> Why do we assert this rather than handling this and having it cause cancellation/failure?

ContentFilter::willSendRequest() blocks by scheduling a substitute data load which cancels the in-progress load, but now that you mention it, it would make more sense to actually null out newRequest and cancel immediately. I'll do that instead.
Comment 6 Andy Estes 2015-04-05 17:24:39 PDT
Committed r182369: <http://trac.webkit.org/changeset/182369>
Comment 7 Myles C. Maxfield 2015-04-06 09:40:27 PDT
This made one test fail consistently on Win. https://build.webkit.org/builders/Apple%20Win%207%20Release%20(Tests)?numbuilds=50
Comment 8 Andy Estes 2015-04-06 17:31:17 PDT
https://bugs.webkit.org/show_bug.cgi?id=143460 tracks the Windows failure.