WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
40897
Get rid of the extensionToMIME mapping in WebBasePluginPackage
https://bugs.webkit.org/show_bug.cgi?id=40897
Summary
Get rid of the extensionToMIME mapping in WebBasePluginPackage
Anders Carlsson
Reported
2010-06-20 19:21:36 PDT
Get rid of the extensionToMIME mapping in WebBasePluginPackage
Attachments
Patch
(5.01 KB, patch)
2010-06-20 19:23 PDT
,
Anders Carlsson
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2010-06-20 19:23:38 PDT
Created
attachment 59223
[details]
Patch
mitz
Comment 2
2010-06-20 19:30:39 PDT
Comment on
attachment 59223
[details]
Patch
> + for (size_t i = 0; i < mimeTypes.size(); ++i) { > + const MimeClassInfo& mimeClassInfo = mimeTypes[i]; > + > + for (size_t i = 0; i < mimeClassInfo.extensions.size(); ++i) {
Please don’t reuse the outer loop’s index variable.
> +- (NSString *)MIMETypeForExtension:(const String&)extension > { > - return [extensionToMIME objectForKey:extension]; > + ASSERT(extension.lower() == extension); > + > + for (size_t i = 0; i < mimeTypes.size(); ++i) { > + const MimeClassInfo& mimeClassInfo = mimeTypes[i]; > + > + for (size_t i = 0; i < mimeClassInfo.extensions.size(); ++i) {
Diito. …
> + return NO;
I doubt that clang++ would allow returning NO from an (NSString *) method. Please return nil.
Anders Carlsson
Comment 3
2010-06-20 19:35:06 PDT
Committed
r61523
: <
http://trac.webkit.org/changeset/61523
>
WebKit Review Bot
Comment 4
2010-06-20 20:12:03 PDT
http://trac.webkit.org/changeset/61523
might have broken SnowLeopard Intel Release (Tests)
Adam Barth
Comment 5
2010-06-20 20:25:13 PDT
Looks like a real failure... Tests that caused the DumpRenderTree tool to crash: compositing/geometry/object-clip-rects-assertion.html stderr dom/html/level2/html/AppletsCollection.html stderr fast/dom/object-embed-plugin-scripting.html stderr plugins/embed-attributes-setting.html expected
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug