Plug-ins should initialize their sandbox at creation time
Created attachment 185028 [details] Patch
Attachment 185028 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm', u'Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm', u'Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm', u'Source/WebKit2/PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm', u'Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32/PluginService.32.Main.mm', u'Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.64/PluginService.64.Main.mm', u'Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/PluginService.Development.Main.mm', u'Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm', u'Source/WebKit2/PluginProcess/PluginProcess.cpp', u'Source/WebKit2/PluginProcess/PluginProcess.h', u'Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm', u'Source/WebKit2/Shared/ChildProcess.h', u'Source/WebKit2/Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.h', u'Source/WebKit2/Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm', u'Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h', u'Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.h', u'Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h', u'Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm', u'Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp', u'Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h', u'Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h', u'Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm', u'Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp', u'Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm', u'Source/WebKit2/WebKit2.xcodeproj/project.pbxproj', u'Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm', u'Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm', u'Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm']" exit_code: 1 Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:47: The parameter name "identifier" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 26 files If any of these errors are false positives, please file a bug against check-webkit-style.
@mithro: I'm not sure we want to be showing the whole command. (See previous comment for context.)
Comment on attachment 185028 [details] Patch I think you should use the name "extraInitializationData" instead of "extraData". Looks great otherwise!
Comment on attachment 185028 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185028&action=review Very nice! > Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm:348 > + NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"AppleMagnifiedMode", nil]; This is moved code, but a RetainPtr would be nice. > Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm:270 > + connectToService(launchOptions, true, that, didFinishLaunchingProcessFunction, instanceUUID.get()); "true that"! > Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm:142 > + // FIXME: We should rip this out once we have a good place to install plug-in > + // sandbox profiles. No need to wrap this short line. > Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm:143 > + NSString* sandboxProfileDirectoryPath = [[NSUserDefaults standardUserDefaults] stringForKey:WebKit2PlugInSandboxProfileDirectoryPathKey]; Misplaced star.
Committed r141051: <http://trac.webkit.org/changeset/141051>