This commit is contained in:
Shu-yu Guo 2012-07-02 15:45:42 -07:00
Родитель 4aa448087c
Коммит 28dd0726bb
2 изменённых файлов: 6 добавлений и 10 удалений

Просмотреть файл

@ -54,9 +54,9 @@ var Domain = (function () {
} }
if (strict) { if (strict) {
return unexpected("Cannot find property " + multiname); return unexpected("Cannot find property " + multiname);
} else {
return undefined;
} }
return undefined;
}, },
getClass: function getClass(simpleName) { getClass: function getClass(simpleName) {

Просмотреть файл

@ -22,19 +22,15 @@
* ApplicationDomain.as * ApplicationDomain.as
*/ */
function ApplicationDomainClass(runtime, scope, instance, baseClass) { function ApplicationDomainClass(runtime, scope, instance, baseClass) {
function ApplicationDomain() {} var c = new Class("ApplicationDomain", instance, C(instance));
var c = new Class("ApplicationDomain", ApplicationDomain, C(ApplicationDomain));
c.extend(baseClass); c.extend(baseClass);
const domain = runtime.domain;
c.nativeMethods = { c.nativeMethods = {
ctor: function (parentDomain) { ctor: function (parentDomain) {
// If no parent domain is passed in, get the current system domain. // If no parent domain is passed in, get the current system domain.
var parent; var parent;
if (!parentDomain) { if (!parentDomain) {
parent = domain; parent = Runtime.stack.top().domain;
while (parent.base) { while (parent.base) {
parent = parent.base; parent = parent.base;
} }
@ -50,11 +46,11 @@
}, },
getDefinition: function (name) { getDefinition: function (name) {
notImplemented("Domain.getDefinition"); return this.d.getProperty(Multiname.fromSimpleName(name), false, true);
}, },
hasDefinition: function (name) { hasDefinition: function (name) {
notImplemented("Domain.hasDefinition"); return !!this.d.findProperty(Multiname.fromSimpleName(name), false, false);
} }
}; };