Fail more gracefully on pre-IE9 browsers (still room for improvement though)

This commit is contained in:
Jeff Parsons 2015-04-25 12:54:03 -07:00 committed by jeffpar
commit fcb7c32909
6 changed files with 43 additions and 9 deletions

View file

@ -1648,7 +1648,7 @@ if (DEBUGGER) {
var aEnable = this.parseCommand(sEnable.replace("keys","key").replace("kbd","keyboard"));
if (aEnable.length) {
for (var m in Debugger.MESSAGES) {
if (aEnable.indexOf(m) >= 0) {
if (usr.indexOf(aEnable, m) >= 0) {
this.bitsMessage |= Debugger.MESSAGES[m];
this.println(m + " messages enabled");
}
@ -1683,7 +1683,7 @@ if (DEBUGGER) {
* @return {number}
*/
Debugger.prototype.getRegIndex = function(sReg) {
return Debugger.REGS.indexOf(sReg.toUpperCase());
return usr.indexOf(Debugger.REGS, sReg.toUpperCase());
};
/**