fuck this shit bro (add tabs.onReplaced notification)

This commit is contained in:
wuggy 2026-09-19 04:40:20 -07:00
commit 5ac0d5acc3
6 changed files with 108 additions and 7 deletions

View file

@ -750,9 +750,12 @@ SingletonEventManager.prototype = {
};
// Simple API for event listeners where events never fire.
function ignoreEvent(context, name) {
function ignoreEvent(context, name, warn = true) {
return {
addListener: function(callback) {
if (!warn) {
return;
}
let id = context.extension.id;
let frame = Components.stack.caller;
let msg = `In add-on ${id}, attempting to use listener "${name}", which is unimplemented.`;
@ -1095,8 +1098,8 @@ class MessageManagerProxy {
if (this.messageManager) {
return this.messageManager.sendAsyncMessage(...args);
}
/* globals uneval */
Cu.reportError(`Cannot send message: Other side disconnected: ${uneval(args)}`);
// Message senders can outlive their child process during normal teardown.
// Treat this as a dropped message instead of reporting a spurious error.
}
/**