From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) by hurricane.the-brannons.com (Postfix) with ESMTPS id BC68578622 for ; Sun, 23 Feb 2014 15:17:08 -0800 (PST) Received: by mail-wg0-f52.google.com with SMTP id b13so4126795wgh.19 for ; Sun, 23 Feb 2014 15:16:10 -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=LzyYOm8rj5KiDezveo9P6a3xlxK1cqGMQVt/t3G8o8U=; b=v9ziJsyMYyIM1g2r5oUNJL/V9D6OHYdiW1hs0oTwLw2QDx6YawKSGkHt7sjbCuxWkR O1PAb7BlpzuAAaBwt+6IluXIwu8EgX3Aq41yHACeEKTfvvjqYEftUdjqOQuRWRBMfhof yJiJwpIENuxDB6p2DCudqEazClesexoO87nYIc+OAt9C1TsiMUP3wBDEKwjp9ajAg6jj z7Cv30TeBmOE7YKIW0fVkz7y/3Mo/8N1/vcHwou7tMOyj4H1wHtYsUTfthIg7SlUbWwB xQoYVIVydEU0FOLeDXaaE+SzcHDpqMix9/iWvZKiYFAHWlK7EGB5Nstb/gmHXYyZp8qS CMMw== X-Received: by 10.180.102.42 with SMTP id fl10mr11747499wib.42.1393197370108; Sun, 23 Feb 2014 15:16:10 -0800 (PST) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id s12sm26698881wju.13.2014.02.23.15.16.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 23 Feb 2014 15:16:09 -0800 (PST) Date: Sun, 23 Feb 2014 23:16:06 +0000 From: Adam Thompson To: Karl Dahlke Message-ID: <20140223231606.GE15819@toaster.adamthompson.me.uk> References: <20140123175711.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140123175711.eklhad@comcast.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] memory error 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: Sun, 23 Feb 2014 23:17:09 -0000 On Sun, Feb 23, 2014 at 05:57:11PM -0500, Karl Dahlke wrote: > > Out of interest are there really cases where the error number > > doesn't reflect the out of memory condition but the message does? > > I think the memory hog test in jsrt is one such. That's really annoying. I've got nothing against taking actions based on the error number as (if I understand the mechanism correctly) this is dependant on the type of error. However, doing things based on the error message (which I think comes from exceptions, user thrown or otherwise) seems a bit more fragile to me. If we don't do this I wonder if it's really such a bad thing since the exception will stop the current script (at least if it makes it to our error reporter), and then js will fail on the next call to one of our functions which uses javaSessionFail anyway. As far as I can tell from the way mozjs behaves, the worst that'll happen is the user'll see a bunch of out of memory errors until something gets called which calls javaSessionFail. As long as we make sure *all* our js stuff behaves correctly in terms of handling errors we shouldn't have a problem with this particular condition causing segfaults I think. What does everyone else think? Cheers, Adam.