From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) by hurricane.the-brannons.com (Postfix) with ESMTPS id EA7B0783F6 for ; Wed, 5 Feb 2014 02:45:16 -0800 (PST) Received: by mail-wg0-f49.google.com with SMTP id a1so147673wgh.28 for ; Wed, 05 Feb 2014 02:44:43 -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=acSqCqLCAxEc0gWZ6UkOYEdQMB+AVm8dMw9A3YcBNGQ=; b=L0yyLxHKF2h8jMOdJz7PAVP/WlB0eiOksyr6Bvcq/7XVoLP9bJNuwOwx1cUAimIPo0 jOvm0jfS340orXAulflfKWH/GWz+mlmJ1Bo6dRwwP5kkdk9cUgcER6JO4/6YGFMIx8ES cpsIk6pAjqSX3Jczn+I4fm8a4y1np3erPau/fzlGX/AT5mhUCx2+WzueSWJYeqFFWh4V Q9AYKtiHjo/FoywkFWlGV97SU5jOvx5Rw6oVbIp/FE/2K0TJCJPfOEm2IBkoX0C/7aM4 yW2P2okxS2qzzAKi52i6AjJammHm/SlkyZQuUdFQTCXuXgYLju9huJg9HFi2+G6lJPy8 lGXA== X-Received: by 10.180.77.200 with SMTP id u8mr1977104wiw.48.1391597082776; Wed, 05 Feb 2014 02:44:42 -0800 (PST) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id y18sm1061592wie.11.2014.02.05.02.44.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 05 Feb 2014 02:44:42 -0800 (PST) Date: Wed, 5 Feb 2014 10:44:39 +0000 From: Adam Thompson To: Karl Dahlke Message-ID: <20140205104439.GP32200@toaster.adamthompson.me.uk> References: <20140104170341.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140104170341.eklhad@comcast.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] compartments 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: Wed, 05 Feb 2014 10:45:17 -0000 On Tue, Feb 04, 2014 at 05:03:41PM -0500, Karl Dahlke wrote: > > When I say a page within a window I'm referring > > to the ability of edbrowse to go back pages. > > cw = cw->prev > > That's a little over simplified, but that's the idea, > go back to the previous edbrowse window, a completely separate window. > Really not different from switching buffers. > The previous window has its own context, its own global object, > its own html page, etc. Ok. I'm not arguing this is a nice solution, but when I tried to work around it, something wasn't working correctly. I'm not entirely sure why but this was the only way I could get it to behave. > I'm not going to mess with it now, I'm working on the representation of lines, > but I may want to remove all those calls and just put one in jSyncup(), > and see if that works. > That is the function that is always called when you enter the world of javascript. > Click a button, submit a form, change a field with onchange code, > any of those things, calls jSyncup(). Are *all* the js functions called from within jsyncup? I don't think this is the case with creating a new context etc, so we still need that one. Also, at the time I did the js changes, html.c was still there so putting it in there wasn't an option. I've not touched any of the html code, so I've got no idea how the ac calls have been done there. At the end of the day, if *all* the js stuff in html.cpp happens within the jsyncup call (so the ac object is still in scope) then the compartment will be correct. This means we can remove *many* of these calls which I'd say is a *good* thing, but as I said, I was only working in the js files *not* the html code so I had to set the compartment at the start of each js function which needed it. > There might be a simpler function call. There is, but Mozilla have said it's obsolete and they have a fairly good record of just removing obsolete functions (and not always updating the docs to reflect this). I can think of a bunch of functions which according to the docs *should* be there (all be it marked obsolete) but aren't any more. Now we've got html.cpp I'll have a look at what's been done and what can be cleaned up. Cheers, Adam.