Reviewed, tweaked, and landed by Darin.
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4286
.Mac prefpane crashes when Safari using CVS WebKit is running
* WebView.subproj/WebView.m: (-[WebView initWithFrame:frameName:groupName:]):
If ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH, and WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
is set in the environment, then unset DYLD_FRAMEWORK_PATH.
* WebKit.xcodeproj/project.pbxproj: Set ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
in configurations other than Default -- we don't want that code in production
builds, but we want it in builds we do ourselves and nightly builds.
WebKitTools:
Reviewed, tweaked, and landed by Darin.
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4286
.Mac prefpane crashes when Safari using CVS WebKit is running
* Scripts/run-safari: Set WEBKIT_UNSET_DYLD_FRAMEWORK_PATH.
* Scripts/run-webkit-app: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@10521
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-09-11 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed, tweaked, and landed by Darin.
+
+ - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4286
+ .Mac prefpane crashes when Safari using CVS WebKit is running
+
+ * WebView.subproj/WebView.m: (-[WebView initWithFrame:frameName:groupName:]):
+ If ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH, and WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
+ is set in the environment, then unset DYLD_FRAMEWORK_PATH.
+
+ * WebKit.xcodeproj/project.pbxproj: Set ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
+ in configurations other than Default -- we don't want that code in production
+ builds, but we want it in builds we do ourselves and nightly builds.
+
2005-09-10 Ingmar J Stein <IngmarStein@gmail.com>
Reviewed and landed by Darin.
GCC_PREPROCESSOR_DEFINITIONS = (
"$(DEBUG_DEFINES)",
"FRAMEWORK_NAME=WebKit",
+ "$(PER_CONFIGURATION_PREPROCESSOR_DEFINES)",
);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(DEBUG_DEFINES)",
"FRAMEWORK_NAME=WebKit",
+ "$(PER_CONFIGURATION_PREPROCESSOR_DEFINES)",
);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(DEBUG_DEFINES)",
"FRAMEWORK_NAME=WebKit",
+ "$(PER_CONFIGURATION_PREPROCESSOR_DEFINES)",
);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(DEBUG_DEFINES)",
"FRAMEWORK_NAME=WebKit",
+ "$(PER_CONFIGURATION_PREPROCESSOR_DEFINES)",
);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
isa = XCBuildConfiguration;
buildSettings = {
GCC_THREADSAFE_STATICS = NO;
+ PER_CONFIGURATION_PREPROCESSOR_DEFINES = ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH;
};
name = Development;
};
isa = XCBuildConfiguration;
buildSettings = {
GCC_THREADSAFE_STATICS = NO;
+ PER_CONFIGURATION_PREPROCESSOR_DEFINES = ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH;
};
name = Deployment;
};
isa = XCBuildConfiguration;
buildSettings = {
GCC_THREADSAFE_STATICS = NO;
+ PER_CONFIGURATION_PREPROCESSOR_DEFINES = ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH;
};
name = OptimizedWithSymbols;
};
isa = XCBuildConfiguration;
buildSettings = {
GCC_THREADSAFE_STATICS = NO;
+ PER_CONFIGURATION_PREPROCESSOR_DEFINES = "";
};
name = Default;
};
self = [super initWithFrame:f];
if (!self)
return nil;
-
+
+#if ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
+ // DYLD_FRAMEWORK_PATH is used so Safari will load the development version of WebKit, which
+ // may not work with other WebKit applications. Unsetting DYLD_FRAMEWORK_PATH removes the
+ // need for Safari to unset it to prevent it from being passed to applications it launches.
+ // Unsetting it when a WebView is first created is as good a place as any.
+ // See <http://bugzilla.opendarwin.org/show_bug.cgi?id=4286> for more details.
+ if (getenv("WEBKIT_UNSET_DYLD_FRAMEWORK_PATH")) {
+ unsetenv("DYLD_FRAMEWORK_PATH");
+ unsetenv("WEBKIT_UNSET_DYLD_FRAMEWORK_PATH");
+ }
+#endif
+
_private = [[WebViewPrivate alloc] init];
[self _commonInitializationWithFrameName:frameName groupName:groupName];
[self setMaintainsBackForwardList: YES];
+2005-09-11 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed, tweaked, and landed by Darin.
+
+ - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4286
+ .Mac prefpane crashes when Safari using CVS WebKit is running
+
+ * Scripts/run-safari: Set WEBKIT_UNSET_DYLD_FRAMEWORK_PATH.
+ * Scripts/run-webkit-app: Ditto.
+
2005-09-11 Darin Adler <darin@apple.com>
* Scripts/run-webkit-tests: Oops. Use spaces, not tabs.
# Set up DYLD_FRAMEWORK_PATH to point to the product directory.
print "Start Safari with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
exec $safariPath, @ARGV or die;
# Set up DYLD_FRAMEWORK_PATH to point to the product directory.
print "Start $ARGV[0] with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
exec "open -a @ARGV";