|Summary:||environment variables are not passed to plug-ins|
|Product:||WebKit||Reporter:||Tom Pelaia II <pelaiata>|
|Component:||Tools / Tests||Assignee:||Nobody <webkit-unassigned>|
|Version:||528+ (Nightly build)|
|OS:||OS X 10.5|
Description Tom Pelaia II 2008-02-01 07:11:07 PST
In previous and currently shipping (v 3.0) versions of Safari, the user's environment variables (both those specified in the user's environment.plist file and (e.g. if launched via Terminal) those defined in the user's shell get passed to plug-ins. The current nightly build of WebKit does not pass environment variables to plug-ins. This breaks a plug-in that we have. It works fine under Safari, but clearly the environment variables are not being passed when run under the current nightly build of WebKit.
Comment 1 Mark Rowe (bdash) 2008-02-01 08:00:00 PST
I'm pretty sure that this an artifact of how WebKitLauncher executes Safari. It calls execve and passes in the set of environment variables necessary to launch Safari correctly, and makes no effort to inherit any from the current environment.
Comment 2 Mark Rowe (bdash) 2008-02-01 08:03:22 PST
It should be possible to test my theory by bypassing the WebKit.app launcher. See the section titled "Testing Your Application With Nightly WebKit" at <http://developer.apple.com/opensource/internet/nightlywebkit.html>, and point it at Safari.app.
Comment 3 Tom Pelaia II 2008-02-01 12:27:25 PST
Yes, as suggested the problem goes away when running Safari with the WebKit engine. I confirmed this pointing Safari to the WebKit frameworks and then going to a website that is rendered differently for Safari and WebKit to verify that I am running WebKit. After confirming that I was running WebKit, I setup my environment variables and my plug-in received them correctly. So, I accept the suggested theory from Mark Rowe that the issue is simply an artifact of the WebKitLauncher. Thank you for the suggestion.