зеркало из https://github.com/mozilla/gecko-dev.git
check for non-null superClass
This commit is contained in:
Родитель
5d311184e2
Коммит
d6c6cc31bb
|
@ -88,7 +88,8 @@ namespace JSClasses {
|
||||||
mSlotCount(superClass ? superClass->mSlotCount : 0)
|
mSlotCount(superClass ? superClass->mSlotCount : 0)
|
||||||
{
|
{
|
||||||
// to "inherit" superClass methods.
|
// to "inherit" superClass methods.
|
||||||
mScope->setPrototype(superClass->mScope);
|
if (superClass)
|
||||||
|
mScope->setPrototype(superClass->mScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
JSClass* getSuperClass()
|
JSClass* getSuperClass()
|
||||||
|
|
|
@ -88,7 +88,8 @@ namespace JSClasses {
|
||||||
mSlotCount(superClass ? superClass->mSlotCount : 0)
|
mSlotCount(superClass ? superClass->mSlotCount : 0)
|
||||||
{
|
{
|
||||||
// to "inherit" superClass methods.
|
// to "inherit" superClass methods.
|
||||||
mScope->setPrototype(superClass->mScope);
|
if (superClass)
|
||||||
|
mScope->setPrototype(superClass->mScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
JSClass* getSuperClass()
|
JSClass* getSuperClass()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче