指针的坑:
var removeFilter = function(method, filter){ _initHook(method); var filters = method['_hooks_'].filters; if(filters.length > 0){ if(filter != undefined){ for(var i in filters){ if(filters[i] == filter){ delete filters[i]; return; } } }else{ //filters = []; //有坑啊,不能用filters。应该将method['_hooks_'].filters指向空地址 method['_hooks_'].filters = []; } } }