From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from qmta05.westchester.pa.mail.comcast.net (qmta05.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:48]) by hurricane.the-brannons.com (Postfix) with ESMTP id 3368A77BCA for ; Wed, 5 Feb 2014 05:56:19 -0800 (PST) Received: from omta15.westchester.pa.mail.comcast.net ([76.96.62.87]) by qmta05.westchester.pa.mail.comcast.net with comcast id NchU1n0031swQuc55dvnBo; Wed, 05 Feb 2014 13:55:47 +0000 Received: from eklhad ([107.5.36.150]) by omta15.westchester.pa.mail.comcast.net with comcast id Ndvm1n00n3EMmQj3bdvnPy; Wed, 05 Feb 2014 13:55:47 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke User-Agent: edbrowse/3.4.10 Date: Wed, 05 Feb 2014 08:55:47 -0500 Message-ID: <20140105085547.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1391608547; bh=l3Rg0i2pYJQ31KjsmtPAfmpNpJAE8MIXzLR0vMI6GQo=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=G79kKMRDaKm3f7zjC5deeaVotHqZoeq9zIEXPndnqY5RVT1KT2uhxHUK4F7Vru3hE jlOgt+vBxuN0kpPUO4FXApQsaFzqAKxb7VDh/aKfKLSBAJJFpCtVzA+9U+yNFulGJ0 UXP7I0w+pNPByOJootd4z205wgO+z8yGZGyPCPZ64zukircZtS5iosntwAaewJRMCh MZIHqXnMiiIoV4K8UT42lq/QWOVW/BvjVRoICsoRSlNHVuHzfPvbQUvFEjEoFm0CJN y3sFQrGDMVTBznKSWd31/zbH+0R4TTFLUCqdSnQFwjKSPsxsc6/eD4Y/jbGRfCuo1g 6L7w0fVAZkqsQ== Subject: [Edbrowse-dev] compartments X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Karl Dahlke List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Feb 2014 13:56:19 -0000 Yes everything you say makes perfect sense. I misspoke a little bit yesterday, or misthought. There are two paths to javascript, creating the global object in the first place, and then activating js later, which always calls jSyncup to get things ready. But aha, raii won't work here. jSyncup calls and sets everything up and returns. Then all the other js functions are called. Set the compartment via raii in jSyncup, and when it returns your compartment is lost. We can only simplify things if there is a straight, old fashioned "set this compartment" call, that does not involve scope or distructors etc. I don't know if such a function exists. If yes then we can clean things up a lot. If no then we can't. Karl Dahlke