Workaround gcc 3.3 internal compiler errors.
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2005 18:46:43 +0000 (18:46 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2005 18:46:43 +0000 (18:46 +0000)
        Reviewed by darin.

        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject stringRepresentation]): call [NSString stringWithCString:encoding] rather than using @""

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9140 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/bindings/objc/WebScriptObject.mm

index a1fea75c66ab1c325a70e2ce60e637aa6547984c..f18cc852e4a8d685dcd7848fa3545b91844f938f 100644 (file)
@@ -1,3 +1,12 @@
+2005-05-09  Chris Blumenberg  <cblu@apple.com>
+
+       Workaround gcc 3.3 internal compiler errors.
+
+        Reviewed by darin.
+
+        * bindings/objc/WebScriptObject.mm:
+        (-[WebScriptObject stringRepresentation]): call [NSString stringWithCString:encoding] rather than using @""
+
 2005-05-09  Darin Adler  <darin@apple.com>
 
         * Makefile.am: Don't set up PBXIntermediatesDirectory explicitly;
index 16e5290fc84aca7b8cbb0b18cfb2f04c52926ed1..8d2c2261b33bf075ec9ea7b6e1f8549ac4ead534 100644 (file)
@@ -49,7 +49,7 @@ using namespace KJS::Bindings;
 
 #define LOG_EXCEPTION(exec) \
     if (Interpreter::shouldPrintExceptions()) \
-        NSLog (@"%s:%d:[%d]  JavaScript exception:  %s\n", __FILE__, __LINE__, getpid(), exec->exception().toObject(exec).get(exec, messagePropertyName).toString(exec).ascii());
+        printf("%s:%d:[%d]  JavaScript exception:  %s\n", __FILE__, __LINE__, getpid(), exec->exception().toObject(exec).get(exec, messagePropertyName).toString(exec).ascii());
 
 @implementation WebScriptObjectPrivate
 
@@ -339,7 +339,8 @@ static KJS::List listFromNSArray(ExecState *exec, NSArray *array)
 - (NSString *)stringRepresentation
 {
     if (![self _isSafeScript])
-       return @"Undefined";
+        // This is a workaround for a gcc 3.3 internal compiler error.
+       return [NSString stringWithCString:"Undefined" encoding:NSASCIIStringEncoding];
 
     Interpreter::lock();
     Object thisObj = Object(const_cast<ObjectImp*>([self _imp]));