diff options
Diffstat (limited to 'data/rhlib')
-rw-r--r-- | data/rhlib/rhbzpage.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/data/rhlib/rhbzpage.js b/data/rhlib/rhbzpage.js index a943eee..7060a37 100644 --- a/data/rhlib/rhbzpage.js +++ b/data/rhlib/rhbzpage.js @@ -56,7 +56,8 @@ var ProfessionalProducts = [ var btSnippet = null; -function RHOnMessageHandler(msg) { + +function RHOnMessageHandler(msg, nextHandler) { switch (msg.cmd) { case "Error": alert("Error " + msg.data); @@ -77,7 +78,15 @@ function RHOnMessageHandler(msg) { queryUpstreamCallback(msg.data, constantData.queryUpstreamBug); break; default: - console.error("Error: unknown RPC call " + msg.toSource()); + if (nextHandler) { + var nextHandler = nextHandlerList.splice(0, 1); + if (nextHandler[0]) { + nextHandler[0](msg, nextHandlerList); + } + } + else { + console.error("Error: unknown RPC call " + msg.toSource()); + } break; } } @@ -136,7 +145,12 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) { break; // If we don't have it here, call superclass method default: - console.error("Unknown command:\n" + cmdLabel + "\nparameters:\n" + cmdParams); + if (MozCentralCommandDispatch) { + MozCentralCommandDispatch(cmdLabel, cmdParams); + } + else { + console.error("Unknown command:\n" + cmdLabel + "\nparameters:\n" + cmdParams); + } break; } } |