When using a JSScope that has a parent scope, don't bother defining the standard properties, they will be shared.

This commit is contained in:
beard%netscape.com 2000-06-23 05:10:46 +00:00
parent 6ccb94e600
commit ca9001f387
2 changed files with 8 additions and 0 deletions

View File

@ -407,6 +407,10 @@ static JSValue defineAdd(const JSValues& argv)
void Context::initContext()
{
// if global has a parent, assume it's been initialized already.
if (mGlobal->getParent())
return;
// predefine the predefined types;
mGlobal->defineVariable(widenCString("any"), JSValue(&Any_Type));

View File

@ -407,6 +407,10 @@ static JSValue defineAdd(const JSValues& argv)
void Context::initContext()
{
// if global has a parent, assume it's been initialized already.
if (mGlobal->getParent())
return;
// predefine the predefined types;
mGlobal->defineVariable(widenCString("any"), JSValue(&Any_Type));