From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) by hurricane.the-brannons.com (Postfix) with ESMTPS id D476777CED for ; Fri, 25 Apr 2014 15:34:37 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id q5so3368182wiv.4 for ; Fri, 25 Apr 2014 15:34:11 -0700 (PDT) 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=iTQH3WnHIl5zMVTqiWfrmSZXXY4Bp1l1QTfEgUGX2PY=; b=bj13AYKwte5+/Cl3nm2NBp/Se94t8SfLdbzWj1tcsp/YyWavQOQ2IruwPX23oLN1lD p9xQMuVHV/6AbTG+vN0Ro+z17f6Ir7cMKHoGYw50DKIh9+TEj5ovIVaJdBbfLdF26rJ5 YrV3lbtSqJ6o8yY7LnPQC459zaQZLj0aOHnH808rhilw4Gxck/pWRMIe6SsrFB+xRFR7 QVvJ59ymokaY6vcN2rxcvo2BVU7UODI+N0w8WOn15Lkh4V7jeNCW9AGsY5h1+a+reDbI Cwqv7m20mPhecm51sP1msyabCchBMAXYGmOqSdkP8V2ANPU2rKzqEOC6oYd8ibaG2kuw n52g== X-Received: by 10.180.104.5 with SMTP id ga5mr5422928wib.47.1398465251721; Fri, 25 Apr 2014 15:34:11 -0700 (PDT) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id uy4sm13162991wjc.8.2014.04.25.15.34.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 25 Apr 2014 15:34:10 -0700 (PDT) Date: Fri, 25 Apr 2014 23:34:07 +0100 From: Adam Thompson To: Karl Dahlke Message-ID: <20140425223407.GQ23557@toaster.adamthompson.me.uk> References: <20140325154821.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TJ9V72hR/LoebVea" Content-Disposition: inline In-Reply-To: <20140325154821.eklhad@comcast.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] JSCLASS_GLOBAL_FLAGS another assert 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, 25 Apr 2014 22:34:38 -0000 --TJ9V72hR/LoebVea Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 25, 2014 at 03:48:21PM +0000, Karl Dahlke wrote: > Ok folks, I need your thoughts here. > I ran into another assert when the bank of america website tried > to create a new window. > It was the same problem as the url class. > It tried to make the new object but the class has JSCLASS_GLOBAL_FLAGS set > and I guess that's a bad thing cause it asserts, > at leasst on the debug environment. > just call window.open() and see. Ah! > So, I take the flag JSCLASS_GLOBAL_FLAGS out of the window class spec and > now it asserts at >=20 > state->jwin =3D JS_NewGlobalObject(state->jcx, &window_class, NULL); >=20 > The global object has to have the global flag set, > but it is part of a class that could be instantiated to make other window= s, > wherein the global flag should not be set. > I guess that's what is happening??? > Should I make two different classes, Window and GlobalWindow? > Not sure what to do here. Yeah, the mozilla docs on global objects make my head spin. I'm not sure what the correct thing to do here is since the window object i= s a seriously special case. A bit of research reveals this rather complex looki= ng spidermonkey thing called split objects [1] which was apparently created specificly to fix this. However, it's so complicated that the page advises people other than Mozilla not to use it. However, it looks like that's how things have to be done in SpiderMonkey fo= r a relatively sane window object possibly. Cheers, Adam. [1] https://developer.mozilla.org/en-US/docs/SpiderMonkey/Split_object --TJ9V72hR/LoebVea Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTWuLfAAoJELZ22lNQBzHOYy0IAJwcaGmMkCWyrHVWk3hrWdW2 4uDSJI/lXM5Lshn/JgongveRtl6Rt3SB6wJG7/qCJcdHK9SchIXo+kKxu+5PqCr+ aALXOZdts2AgcPAHmKXapJbYH2iRExZuxCuTjZtdm+fk8Lyj2Cltyq2QPNLkkA9G 1g1/9eor7YjkB/zzXDBPYot6g7zctZXPT4OJC0Gnzkhzk8DqOWQPSDB4IgaC25ok Qm3t37XthzeLcveaOl6T1KwCn5/2c+P5MUmSMvLZKZBQb13skZgz6AJfpmO+iLtM 5cxRQR9Ziy+f4ceTtdw9TmIuV59UDLLhJ5hDqhNh/L4pfLMxalZw8Dfo28CgheE= =fnZQ -----END PGP SIGNATURE----- --TJ9V72hR/LoebVea--