Bug 57196 - Fix script-src redirect handling
Summary: Fix script-src redirect handling
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 53572
  Show dependency treegraph
 
Reported: 2011-03-27 17:00 PDT by Adam Barth
Modified: 2011-03-27 22:16 PDT (History)
1 user (show)

See Also:


Attachments
Patch (9.68 KB, patch)
2011-03-27 17:08 PDT, Adam Barth
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2011-03-27 17:00:54 PDT
Fix script-src redirect handling
Comment 1 Adam Barth 2011-03-27 17:08:21 PDT
Created attachment 87091 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-03-27 20:51:30 PDT
Comment on attachment 87091 [details]
Patch

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

Seems reasonable.

> Source/WebCore/loader/cache/CachedResourceLoader.cpp:261
>      default:

default: is always sub-optimal when dealing with enums.  How many would it be to list out the rest and have them all break?
Comment 3 Adam Barth 2011-03-27 21:02:31 PDT
(In reply to comment #2)
> (From update of attachment 87091 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=87091&action=review
> 
> Seems reasonable.
> 
> > Source/WebCore/loader/cache/CachedResourceLoader.cpp:261
> >      default:
> 
> default: is always sub-optimal when dealing with enums.  How many would it be to list out the rest and have them all break?

It wouldn't be that hard.  I removed a bunch of defaults from the rest of this function in this patch.  I'm inclined to leave it or change it to an if.  Maybe an if would be best actually...
Comment 4 Adam Barth 2011-03-27 22:16:02 PDT
Committed r82085: <http://trac.webkit.org/changeset/82085>