[General] Safari 4 Crashing: A Patch

Daniel Ingalls Dan.Ingalls at Sun.com
Thu Apr 9 16:56:21 CEST 2009


Phil, this is a great help!

I'll get something out today after I understand it fully.
There seem to be a number of problems with keyboard
commands as well.  Might be related.

Many thanks.

	- Dan
-----------------------
> The crash is related to the value returned from  
> String.fromCharCode(173). In Lively and in a simple html file:  
> console.log prints nothing visible for the character and  
> window.alert prints a character. This displayed character resembles  
> a minus symbol. I haven't found an ascii table yet which indicates  
> what this is supposed to represent.
>
> Tracked this down via computeExtents[Config.fontMetricsFromHTML] in  
> Text.js. I attempted to do some detections on the text node and try/ 
> catch but was unsuccessful. Have not reported anything to Apple -  
> feel free.
>
> String.fromCharCode = String.fromCharCode.wrap(function(proceed,  
> charCode) {
> 	var result = proceed(charCode);
> 	if (charCode == 173) {
> 		result = '-';
> 	}
> 	return result;
> });
> ...
> Actually it might be more cautious to just add special case in  
> computeExtents (html). But I'm sure you all can figure out what's  
> best.
>
> Phil





More information about the lively-kernel mailing list