WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160831
Move the plug-in and WebGL blacklist code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=160831
Summary
Move the plug-in and WebGL blacklist code to WebCore
Anders Carlsson
Reported
2016-08-12 16:08:15 PDT
Move the plug-in and WebGL blacklist code to WebCore
Attachments
Patch
(59.19 KB, patch)
2016-08-12 16:13 PDT
,
Anders Carlsson
no flags
Details
Formatted Diff
Diff
Patch
(59.19 KB, patch)
2016-08-12 16:37 PDT
,
Anders Carlsson
no flags
Details
Formatted Diff
Diff
Patch
(58.85 KB, patch)
2016-08-12 16:56 PDT
,
Anders Carlsson
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2016-08-12 16:13:17 PDT
Created
attachment 285971
[details]
Patch
Anders Carlsson
Comment 2
2016-08-12 16:37:23 PDT
Created
attachment 285975
[details]
Patch
WebKit Commit Bot
Comment 3
2016-08-12 16:39:47 PDT
Attachment 285975
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/mac/PluginBlacklist.mm:150: Missing space around : in range-based for statement [whitespace/colon] [4] Total errors found: 1 in 17 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 4
2016-08-12 16:44:41 PDT
Comment on
attachment 285971
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=285971&action=review
> Source/WebCore/platform/mac/BlacklistUpdater.h:33 > +#include <Foundation/Foundation.h> > +#include <memory> > +#include <string> > +#include <vector>
I'm not sure you need any of these. Maybe something for dispatch_queue_t.
> Source/WebCore/platform/mac/BlacklistUpdater.h:51 > +private: > + > + static NSDictionary *readBlacklistData();
Extra newline.
> Source/WebCore/platform/mac/BlacklistUpdater.mm:59 > +NSDictionary * BlacklistUpdater::readBlacklistData()
Extra space.
> Source/WebCore/platform/mac/BlacklistUpdater.mm:90 > + s_pluginBlacklist = 0;
nullptr.
> Source/WebCore/platform/mac/BlacklistUpdater.mm:95 > + s_webGLBlacklist = 0;
nullptr.
> Source/WebCore/platform/mac/PluginBlacklist.h:66 > + NSDictionary *m_bundleIDToMinimumSecureVersion; > + NSDictionary *m_bundleIDToMinimumCompatibleVersion; > + NSDictionary *m_bundleIDToBlockedVersions; > + NSSet *m_bundleIDsWithAvailableUpdates;
RetainPtrs?
> Source/WebCore/platform/mac/PluginBlacklist.mm:72 > + CFDictionaryRef systemVersionDictionary = _CFCopySystemVersionDictionary();
RetainPtr?
> Source/WebCore/platform/mac/PluginBlacklist.mm:87 > + for (NSString *bundleID in bundleIDs) {
What is guaranteeing these are all NSStrings?
> Source/WebCore/platform/mac/PluginBlacklist.mm:89 > + assert(versionInfo);
ASSERT?
> Source/WebCore/platform/mac/PluginBlacklist.mm:117 > + return std::unique_ptr<PluginBlacklist>(new PluginBlacklist(bundleIDToMinimumSecureVersion, bundleIDToMinimumCompatibleVersion, bundleIDToBlockedVersions, bundleIDsWithAvailableUpdates));
std::make_unique?
> Source/WebCore/platform/mac/WebGLBlacklist.mm:74 > + int major; // Represents the 13 in 13C64. > + int minor; // Represents the C in 13C64 (as a number where A == 1, i.e. 3). > + int build; // Represents the 64 in 13C64.
= 0; here to avoid need for default constructor.
> Source/WebCore/platform/mac/WebGLBlacklist.mm:86 > + return OSBuildInfo();
return { };
> Source/WebCore/platform/mac/WebGLBlacklist.mm:153 > + unsigned maskValue; > + [scanner scanHexInt:&maskValue];
Please write a function that given a string with hex digits returns an unsigned 32-bit int.
> Source/WebCore/platform/mac/WebGLBlacklist.mm:171 > + CFDictionaryRef systemVersionDictionary = _CFCopySystemVersionDictionary();
RetainPtr?
> Source/WebCore/platform/mac/WebGLBlacklist.mm:215 > + for (NSDictionary *blockData in blockEntries) { > + > + GLint gpuMask = gpuMaskFromString([blockData objectForKey:@"GPU"]);
Extra newline.
> Source/WebCore/platform/mac/WebGLBlacklist.mm:242 > + return std::unique_ptr<WebGLBlacklist>(new WebGLBlacklist(globalCommand));
std::make_unique
> Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h:32 > +#include <WebCore/PluginBlacklist.h>
Why is this change needed?
Sam Weinig
Comment 5
2016-08-12 16:48:08 PDT
Comment on
attachment 285975
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=285975&action=review
> Source/WebCore/platform/mac/PluginBlacklist.mm:46 > + PluginBlacklist* pluginBlacklist = BlacklistUpdater::pluginBlacklist();
auto*?
> Source/WebCore/platform/mac/PluginBlacklist.mm:62 > + PluginBlacklist* pluginBlacklist = BlacklistUpdater::pluginBlacklist();
auto*
> Source/WebCore/platform/mac/WebGLBlacklist.mm:113 > + WebGLBlacklist* webGLBlacklist = BlacklistUpdater::webGLBlacklist();
auto*
> Source/WebCore/platform/mac/WebGLBlacklist.mm:129 > + WebGLBlacklist* webGLBlacklist = BlacklistUpdater::webGLBlacklist();
auto*
> Source/WebCore/platform/mac/WebGLBlacklist.mm:211 > + BlockCommand globalCommand = BlockCommand::Allow;
auto?
> Source/WebCore/platform/mac/WebGLBlacklist.mm:217 > + OSBuildInfo blockedBuildInfo = buildInfoFromOSBuildString(static_cast<NSString*>([blockData objectForKey:@"OSBuild"]));
auto?
> Source/WebCore/platform/mac/WebGLBlacklist.mm:220 > + BlockComparison comparison = BlockComparison::Equals;
auto?
> Source/WebCore/platform/mac/WebGLBlacklist.mm:227 > + BlockCommand command = BlockCommand::Allow;
auto?
Anders Carlsson
Comment 6
2016-08-12 16:56:22 PDT
Created
attachment 285980
[details]
Patch
WebKit Commit Bot
Comment 7
2016-08-12 16:59:41 PDT
Attachment 285980
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/mac/PluginBlacklist.mm:150: Missing space around : in range-based for statement [whitespace/colon] [4] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Anders Carlsson
Comment 8
2016-08-15 09:40:08 PDT
(In reply to
comment #5
)
> Comment on
attachment 285975
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=285975&action=review
> > > Source/WebCore/platform/mac/PluginBlacklist.mm:46 > > + PluginBlacklist* pluginBlacklist = BlacklistUpdater::pluginBlacklist(); > > auto*? > > > Source/WebCore/platform/mac/PluginBlacklist.mm:62 > > + PluginBlacklist* pluginBlacklist = BlacklistUpdater::pluginBlacklist(); > > auto* > > > Source/WebCore/platform/mac/WebGLBlacklist.mm:113 > > + WebGLBlacklist* webGLBlacklist = BlacklistUpdater::webGLBlacklist(); > > auto* > > > Source/WebCore/platform/mac/WebGLBlacklist.mm:129 > > + WebGLBlacklist* webGLBlacklist = BlacklistUpdater::webGLBlacklist(); > > auto* > > > Source/WebCore/platform/mac/WebGLBlacklist.mm:211 > > + BlockCommand globalCommand = BlockCommand::Allow; > > auto? > > > Source/WebCore/platform/mac/WebGLBlacklist.mm:217 > > + OSBuildInfo blockedBuildInfo = buildInfoFromOSBuildString(static_cast<NSString*>([blockData objectForKey:@"OSBuild"])); > > auto? > > > Source/WebCore/platform/mac/WebGLBlacklist.mm:220 > > + BlockComparison comparison = BlockComparison::Equals; > > auto? > > > Source/WebCore/platform/mac/WebGLBlacklist.mm:227 > > + BlockCommand command = BlockCommand::Allow; > > auto?
I'll resolve these in an upcoming patch - I wanted to keep the changes between WKSI and Open Source minimal.
Anders Carlsson
Comment 9
2016-08-15 09:44:48 PDT
Committed
r204462
: <
http://trac.webkit.org/changeset/204462
>
Hunseop Jeong
Comment 10
2016-08-16 20:48:23 PDT
CMake build fix Committed
r204548
: <
http://trac.webkit.org/changeset/204548
>
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