1
0
Fork 0

[#25] Added attachInstanceOf TODO

closure/master
Mike Gerwitz 2011-10-30 11:56:54 -04:00
parent 08cb663833
commit 91332353e9
1 changed files with 3 additions and 0 deletions

View File

@ -1065,6 +1065,9 @@ function attachInstanceOf( instance )
return module.exports.isInstanceOf( type, instance ); return module.exports.isInstanceOf( type, instance );
}; };
// TODO: To improve performance (defineSecureProp can be costly), simply
// define a normal prop and freeze the class afterward. The class shouldn't
// have any mutable methods.
util.defineSecureProp( instance, 'isInstanceOf', method ); util.defineSecureProp( instance, 'isInstanceOf', method );
util.defineSecureProp( instance, 'isA', method ); util.defineSecureProp( instance, 'isA', method );
} }