Bug 145027

Summary: [Content Extensions] Fail to load old content extension files
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: WebKit2Assignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, eric.carlson, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch eric.carlson: review+, achristensen: commit-queue-

Description Alex Christensen 2015-05-14 16:12:40 PDT
Old files are causing crashes.  Let's fail to load them.
Comment 1 Alex Christensen 2015-05-14 16:14:10 PDT
Created attachment 253153 [details]
Patch
Comment 2 Eric Carlson 2015-05-15 09:37:25 PDT
Comment on attachment 253153 [details]
Patch

Thank you Alex!
Comment 3 Alex Christensen 2015-05-15 10:03:30 PDT
Comment on attachment 253153 [details]
Patch

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

> Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp:157
> +    if (metaData.version != UserContentExtensionStore::CurrentContentExtensionFileVersion)
> +        return false;

Instead of returning false here, I'm going to check the metaData.version after openAndMapContentExtension returns and call the completionHandler with a new type of error (Error::VersionMismatch or something).
Comment 4 Alex Christensen 2015-05-15 13:51:04 PDT
http://trac.webkit.org/changeset/184413