From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 0DE5C78468 for ; Tue, 18 Feb 2014 07:26:20 -0800 (PST) Received: by mail-wi0-f180.google.com with SMTP id hm4so3598889wib.7 for ; Tue, 18 Feb 2014 07:25:30 -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=TkO6JdVT7RzKW/7/gkHdcmWLNkzApEwXGNzF56TJNsw=; b=AIXbRhtIOev61eWRWLs1GHXZ5LzYLpSVo8V9dwWwGznsCyd//0c3DRz/VxTd/FmrGg 5Khe3USOmUa/0pp4zoLhEo7cEOUDxWB/1O909AQq9sEFYxpRdhYLMV/NaPZorTiElQ1g mqOcYszKXG3JRXCH7oWVCCyYGYs5i9yvPJQ4HkZ+s4qT+JgO+BKCnMeREEELxLmAEPJW RMHI6Lo5QfAlSalPvtAl24Uix3mWxib+VdfCuHkh+rtHyr/IKmh99vsUhG7yrlm4YtwE 6LP91TV3JEQrf0cXIxhYNIohGcnvh1SQsdwdsmdtwsirHVFHIn5kvQ7ufFjUTyHNC6kE VRJA== X-Received: by 10.194.186.204 with SMTP id fm12mr23455132wjc.27.1392737128689; Tue, 18 Feb 2014 07:25:28 -0800 (PST) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id ea4sm42962238wib.7.2014.02.18.07.25.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 18 Feb 2014 07:25:27 -0800 (PST) Date: Tue, 18 Feb 2014 15:25:24 +0000 From: Adam Thompson To: Karl Dahlke Message-ID: <20140218152524.GG28870@toaster.adamthompson.me.uk> References: <20140112095104.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140112095104.eklhad@comcast.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Edbrowse-dev@lists.the-brannons.com Subject: [Edbrowse-dev] switch compartment and error handling 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: Tue, 18 Feb 2014 15:26:21 -0000 On Wed, Feb 12, 2014 at 09:51:04AM -0500, Karl Dahlke wrote: > > Yeah, I guess we'll need some wrappers to do this. > > Well the logic is > > if(unrecoverable failure) { > i_puts("helpful messsage saying your javascript is rendered invalid for this session, > but will still operate in other sessions."); > DestroyContext(cw->jss->jcx); > delete cw->jss); > cw->jss = NULL; > } > > This could be a function, inline function, or macro, > guess I don't have strong feelings about that. Ok, this is done, see javaSessionFail in jsdom.cpp. I've also made a start at some sort of error handling in jsdom.cpp. I've pushed all these changes, and am going to have a look at jsloc.cpp as well. Cheers, Adam. PS: is this also needed in html.cpp or does it just call into js*.cpp?