edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] JSCLASS_GLOBAL_FLAGS another assert
Date: Fri, 25 Apr 2014 23:34:07 +0100	[thread overview]
Message-ID: <20140425223407.GQ23557@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20140325154821.eklhad@comcast.net>

[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]

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
> 
> state->jwin = JS_NewGlobalObject(state->jcx, &window_class, NULL);
> 
> The global object has to have the global flag set,
> but it is part of a class that could be instantiated to make other windows,
> 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 is a
seriously special case. A bit of research reveals this rather complex looking
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 for a
relatively sane window object possibly.

Cheers,
Adam.
[1] https://developer.mozilla.org/en-US/docs/SpiderMonkey/Split_object

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2014-04-25 22:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-25 15:48 Karl Dahlke
2014-04-25 22:34 ` Adam Thompson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140425223407.GQ23557@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).