From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 4ED5377889 for ; Fri, 17 Jan 2014 04:09:59 -0800 (PST) Received: by mail-wg0-f47.google.com with SMTP id m15so4319165wgh.26 for ; Fri, 17 Jan 2014 04:09:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=UOD/I1vhSU37++FUCwYCNs8H6kRurb97pXK6uRqGUFk=; b=HV5Vy8i0i7qiPnSslSKAbnA+6LPWPQ8HV1O4RNvPaKyA3RywizqjPC97DU3V9Hve3i V0ejgC+FEZ8dBukb/AhkSTYpXKzkGGTTwiWouzxIQzxRuKowc10QFY9VreqiBZUgFlsK JJx34u00gwopTShl924c3DkAKsX6HhKC836cxYSlHHQUXIVS3XjZkZIW6HbXaxhp+tDk EtMzQJxAOMv8thQAXqEcUNm0S9vQq66p9XZENSdX61h3iacPRyXii5n5aUZXI6slfROJ qjaeylcW+nCGGZW/hnf5bFyMtfLZNPgw1onIvqyBbbH3hFhqTUxC3GEsF/GV7+OWw+IA zMWQ== X-Received: by 10.180.7.227 with SMTP id m3mr1937509wia.59.1389960593247; Fri, 17 Jan 2014 04:09:53 -0800 (PST) Received: from spoons.adamthompson.me.uk ([2001:630:53:b75:224:d2ff:fed0:3338]) by mx.google.com with ESMTPSA id dm2sm2883252wib.8.2014.01.17.04.09.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 Jan 2014 04:09:52 -0800 (PST) Date: Fri, 17 Jan 2014 12:09:49 +0000 From: Adam Thompson To: Chris Brannon Message-ID: <20140117120949.GC21779@spoons.adamthompson.me.uk> References: <20140008060551.eklhad@comcast.net> <20140108124047.GB3935@toaster.adamthompson.me.uk> <87y52iuwej.fsf@mushroom.PK5001Z> <20140114212737.GC31480@toaster.adamthompson.me.uk> <87txd6us1n.fsf@mushroom.PK5001Z> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87txd6us1n.fsf@mushroom.PK5001Z> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] js progress update X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jan 2014 12:09:59 -0000 On Tue, Jan 14, 2014 at 02:17:40PM -0800, Chris Brannon wrote: > Adam Thompson writes: > > > We also need to work out a good way of testing for memory leaks, > > I was thinking of running under valgrind for extended periods of web browsing. > > It's a good idea. I found lots of memory leaks this way in the past, > along with a couple memory corruption bugs. > Browsing under valgrind is a little more sluggish, as one would expect, > but it isn't terrible by any means. Yeah, particularly if using a debug build of smjs. I still haven't heard back about the debian package, and am still no nearer figuring out what's going on there. The segfault seems to be in something called as a consequence of the JS_NewContext function, which doesn't break in any of the SpiderMonkey builds I've done, even the ones with optimisations enabled and debugging disabled. I've uncovered a very interesting js bug with this version of edbrowse though, where it sometimes fails to initialise the standard classes for the jwin object. I'm trying to work out exactly why this is the case, however university assignments are reducing the speed of debugging at the moment. It may be worth checking that I've always done the right thing regarding setting jwin to the correct object and setting the correct compartment for the js context. Unfortunately it looks as if each new global object gets its own compartment now and the only way I've managed to get the compartment to be switched reliably is to switch at the start of each function which needs to use the global object. This isn't particularly nice and needs cleaning up when we do the major rewrite. Cheers, Adam.