Bug 145027 - [Content Extensions] Fail to load old content extension files
Summary: [Content Extensions] Fail to load old content extension files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-14 16:12 PDT by Alex Christensen
Modified: 2015-05-15 13:51 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.54 KB, patch)
2015-05-14 16:14 PDT, Alex Christensen
eric.carlson: 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 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