WebKit:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Sep 2005 17:04:19 +0000 (17:04 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Sep 2005 17:04:19 +0000 (17:04 +0000)
        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

WebKit/ChangeLog
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView.subproj/WebView.m
WebKitTools/ChangeLog
WebKitTools/Scripts/run-safari
WebKitTools/Scripts/run-webkit-app

index c747f4bdff58ba36817a4a3fdb0bdc71f835d444..33e53063ac95ff6d813ddaf2cbbf547cb2803669 100644 (file)
@@ -1,3 +1,18 @@
+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.
index 39562617191eacf24447268f1ec368e73f74e38c..b403bd537ed4ada629598568c8a45f7af9f3129a 100644 (file)
                                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;
                };
index e82aba256650d9bcaae1eb973941b7dea7f00658..2288b83aeae5190e36aac56bd7723ff65b7a36f3 100644 (file)
@@ -1596,7 +1596,19 @@ NSMutableDictionary *countInvocations;
     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];
index 3ff20949f9f5c01dc898e0039b75bde7c1696182..e249c054607431cf540c1fac8e2efd8cc304bd15 100644 (file)
@@ -1,3 +1,13 @@
+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.
index c0d9c8210624fede650d9593558340d83de17733..dcece252ea1a46eb3f6747dbb1cd975360ca70fb 100755 (executable)
@@ -43,4 +43,5 @@ checkFrameworks();
 # 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;
index 585d88a388c081f07e3eb3e901ef0b59892ee7a6..f6d035b085033f69d8f08c78695f9071ad9f3a77 100755 (executable)
@@ -44,4 +44,5 @@ checkFrameworks();
 # 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";