GNOME Bugzilla – Bug 619710
[patch] log a warning if addSignalMethods() replaces existing methods
Last modified: 2017-01-03 14:24:21 UTC
Created attachment 162015 [details] [review] patch which logs a warning if addSignalMethods() replaces existing methods I found it helpful to log a warning when addSignalMethods() ends up replacing existing methods on objects. Attaching a patch for this.
Comment on attachment 162015 [details] [review] patch which logs a warning if addSignalMethods() replaces existing methods [Setting "patch" flag and correcting mime type so this can actually be queried for.]
Review of attachment 162015 [details] [review]: Looks fine. Since this patch is 7 and a half years old and you're probably not monitoring the bug anymore, I will push it with the change that I suggested, plus a test. ::: modules/signals.js @@ +142,3 @@ + log("WARNING: addSignalMethods is replacing existing " + + proto + " " + functionName + " method"); + log("WARNING: old " + functionName + ": " + proto[functionName]); I'd drop these two "old" and "new" lines, since on modern SpiderMonkey they will most likely print 'function something() { [sourceless code] }'
Indeed I am not, but thank you for landing it anyway. Better late than never!