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: signature.asc
Description: Digital signature

_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to