lightspark-users team mailing list archive
-
lightspark-users team
-
Mailing list archive
-
Message #00054
Global object/s
Hey,
while looking through the code, I saw that in ABCContext::exec
we create a global object for each script by
global=Class<ASObject>::getInstanceS();
and then do
getGlobal()->registerGlobalScope(global);
which adds the 'global' to the globalScopes member of GlobalObject.
Why do we have multiple global scopes? It seems that
GlobalObject::getVariableAndTargetByMultiname searches through all
global objects,
so it should be the same if we have just one instead of multiple?
Then, I would derive GlobalObject from ASObject, as toString() on the
global object should return "[object Global]".
(we return [object Object] currently).
Cheers,
Matthias
Follow ups