Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > World Leaks in Safari, any clues to track down?

Reply
Thread Tools

World Leaks in Safari, any clues to track down?

 
 
dd
Guest
Posts: n/a
 
      01-17-2007
I have a page that works just fine on all OS'es/Browsers
except Safari. When I close the page I get a world leak
triggered by the JavaScript Interpreter. I know most people
don't have the "always check for world leaks" on, so it's
not like it's going to happen for Joe user, but I've got some
code that Safari's JS interpreter isn't happy with and I want
to track it down. Just like I do with anything that appears
in the Firefox console, even if it's only a warning.

Anyone have any useful tips for tracking down stuff in
Safari? I was planning to start adding a return statement in
my onunload handling code (because it only happens when
I close the browser) and move the return further and further
towards the end of the function, assuming that it'll keep
working and working and then eventually I'll move the return
to after the code that causes the world leak. It's annoying
and time-consuming though

 
Reply With Quote
 
 
 
 
dd
Guest
Posts: n/a
 
      01-17-2007
Forgot to mention I'm using Safari 10.3.2 (I can't get it
to upgrade further than that because I'm stuck on OSX
10.3.9 and newer versions of OSX come on DVD and
my crappy iBook only has CDROM)...

 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      01-17-2007
dd wrote:
> Forgot to mention I'm using Safari 10.3.2


That's hardly given that the most recent version is only 2.0.4
That must be MacOS version 10.3.2, so Safari is no higher then than 1.3
- that makes it pretty useless for debugging. It's like debugging right
now on Mac IE 5.0 in hope to become ready for Win IE 6 and 7. Most of
workarounds made will not be necessary, and the necessary workarounds
will not be found. If you are targeted to cover Safari as well, then
sorry but you need 2.0.4 - this is the only usable and anyhow
acknowledged Safari version. Also you can get yourselve a nightly build
from <http://webkit.org/> But I cannot guarantee that it will go on
10.3.2

As not a definitive guide of any kind but as recommendations that might
be useful see also:
<http://developer.yahoo.com/yui/articles/gbs/gbs_browser-chart.html>
<http://developer.yahoo.com/yui/articles/gbs/gbs.html>

 
Reply With Quote
 
dd
Guest
Posts: n/a
 
      01-17-2007
Yeah I know I need Tiger. The annoying thing is, I have
the DVD for it, I just can't stick the darned thing in the
drive

Unfortunately my delivery matrix goes back to Safari
1.2 so I have to support it.

Luckily I just found the problem. Run-on cases in a
switch statement. Safari JS interpreter doesn't like
them. Here's what I had, reduced to example code:

switch(p.charAt(0))
{
case "I":break;
case "C":
case "U":break;
case "T":break;
default:break;
}

I'm switching on a character rather than a number,
but the crucial thing is the lack of a break on the
"C" case because I want it to run through into the
"U" case. Obviously I've taken the actual code out
of the example just to leave the underlying structure.

Once I put that break in, Safari is happy again. No
more world leaks.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"This is often an indication that other memory is corrupt." Error. Any clues? darrel ASP .Net 5 07-09-2007 01:30 PM
Path to Paradise - any clues AceoHearts DVD Video 0 01-19-2007 02:19 PM
XP Wireless Networking Problems - Any Clues Douks Wireless Networking 0 10-06-2005 10:22 AM
callmanager 3.3 not working with vg200. Any clues? KJ Cisco 0 06-06-2004 04:16 PM
help any clues leslie j keeley Computer Support 3 08-31-2003 06:59 AM



Advertisments