Closed Bug 685466 Opened 8 years ago Closed 8 years ago
.on Security Change is not a function] on every tab change
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0a1) Gecko/20110907 Firefox/9.0a1 SeaMonkey/2.6a1 Build ID: 20110907003046 Steps to reproduce: Changing tabs in trunk build (ID: 20110907003046). Actual results: Error console entries on every tab change: > Error: element.onSecurityChange is not a function > Source File: chrome://navigator/content/tabbrowser.xml > Line: 892 I don't know of any other consequences, but looking at the code, it seems some things might get missed. I'm pretty sure this didn't happen on yesterday's build and it sure doesn't happen on 2.4b1.
This seems to be caused by the latest development version of RequestPolicy. (https://addons.mozilla.org/en-US/seamonkey/addon/requestpolicy/) I'm setting this as invalid an will contact the author. Sorry!
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Reopening due to Mozillazine thread: http://forums.mozillazine.org/viewtopic.php?p=11227331#p11227331 "Our tabbrowser implementation is separate. We usually try to keep the API in sync with Firefox and indeed we did make all events optional, but we missed one code path".
Status: RESOLVED → REOPENED
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Resolution: INVALID → ---
https://developer.mozilla.org/en/Code_snippets/Progress_Listeners "Starting in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) , all events are optional. The tabbrowser only notifies you of the events for which you provide a callback."
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #560300 - Flags: review?(neil)
Comment on attachment 560300 [details] Patch v1.0 onSecurityChange should be optional. > element.onLocationChange(aWebProgress, aRequest, aLocation); Should this be optional too? >+ if (aSecurityUI && ("onSecurityChange" in element)) Nit: unnecessary ()s. (Only needed for the !("foo" in bar) case.)
Attachment #560300 - Flags: review?(neil) → review+
>> element.onLocationChange(aWebProgress, aRequest, aLocation); > Should this be optional too? I suppose so. Done. >>+ if (aSecurityUI && ("onSecurityChange" in element)) > Nit: unnecessary ()s. (Only needed for the !("foo" in bar) case.) Fixed.
Pushed to comm-central: http://hg.mozilla.org/comm-central/rev/cb68addedf54
Comment on attachment 560349 [details] [diff] [review] Patch v1.1 onLocationChange should be optional too r=Neil. Request approval. Affects extensions like Request Policy which expect tabbrowser events to be optional as documented in developer.mozilla.org.
You need to log in before you can comment on or make changes to this bug.