WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
115483
[WK2][Mac] Pass plug-in bundle ID to LaunchServices
https://bugs.webkit.org/show_bug.cgi?id=115483
Summary
[WK2][Mac] Pass plug-in bundle ID to LaunchServices
Alexey Proskuryakov
Reported
2013-05-01 11:39:02 PDT
<
rdar://problem/13600073
>
Attachments
proposed patch
(5.73 KB, patch)
2013-05-01 11:43 PDT
,
Alexey Proskuryakov
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2013-05-01 11:43:22 PDT
Created
attachment 200230
[details]
proposed patch
Darin Adler
Comment 2
2013-05-01 13:34:36 PDT
Comment on
attachment 200230
[details]
proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=200230&action=review
> Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm:47 > +const CFStringRef _kLSPluginBundleIdentifierKey = CFSTR("LSPluginBundleIdentifierKey");
Why the underscore? Don’t we need “static” on this to prevent it from having external linkage?
> Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm:285 > +static String loadSandboxProfileForDirectory(String bundleIdentifier, NSString *sandboxProfileDirectoryPath)
Why the change from const String& to String for the argument type? Please use const String&.
Alexey Proskuryakov
Comment 3
2013-05-01 14:20:02 PDT
Comment on
attachment 200230
[details]
proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=200230&action=review
>> Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm:47 >> +const CFStringRef _kLSPluginBundleIdentifierKey = CFSTR("LSPluginBundleIdentifierKey"); > > Why the underscore? Don’t we need “static” on this to prevent it from having external linkage?
I guess I was just thinking of matching other similar keys. No need to do that here indeed. In C++, constants do not have external linkage, so we do not need "static" here.
>> Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm:285 >> +static String loadSandboxProfileForDirectory(String bundleIdentifier, NSString *sandboxProfileDirectoryPath) > > Why the change from const String& to String for the argument type? Please use const String&.
I'm modifying the argument in the function. I think that asking the caller to do the copy is a fairly common and desirable pattern, as this gives the compiler more opportunities for optimization.
Alexey Proskuryakov
Comment 4
2013-05-06 11:39:50 PDT
Committed <
http://trac.webkit.org/r149619
>.
Alexey Proskuryakov
Comment 5
2013-05-06 11:40:44 PDT
Went with const String&. While I think that a String is just fine, we should probably start using this idiom in some place where it demonstrably improves performance, not here.
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