World Leaks in Safari, any clues to track down?

Discussion in 'Javascript' started by dd, Jan 17, 2007.

  1. dd

    dd Guest

    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 :(
    dd, Jan 17, 2007
    1. Advertisements

  2. dd

    dd Guest

    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)...
    dd, Jan 17, 2007
    1. Advertisements

  3. VK

    VK Guest

    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 <> But I cannot guarantee that it will go on

    As not a definitive guide of any kind but as recommendations that might
    be useful see also:
    VK, Jan 17, 2007
  4. dd

    dd Guest

    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:

    case "I":break;
    case "C":
    case "U":break;
    case "T":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.
    dd, Jan 17, 2007
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SeanGallavan
    Mar 1, 2005
  2. darrel
    Jul 9, 2007
  3. Brock
    Teemu Keiski
    Jul 9, 2008
  4. sm6nnc
    Rich Alderson
    Dec 2, 2008
  5. Victor Stinner
    Victor Stinner
    Mar 7, 2013

Share This Page