mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
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:
parent
6ccb94e600
commit
ca9001f387
@ -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));
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user