Closed Bug 472558 Opened 16 years ago Closed 12 years ago

onSecurityChange fired too often

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: taras.mozilla, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

Gavin says we can add a guard checking for https urls.
Attached patch patch (obsolete) — Splinter Review
This should help, by avoiding work when transitioning between non-https pages. We could probably push this further and avoid more state changes when the state is the same but for a different host, but that's probably not worth optimizing.

I had to create a global progress listener to properly keep state among different tabs. I'm going to prepare a similar patch for Firefox, since we're sharing essentially the same code here and it would be nice to keep them in sync.
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attached patch merged w/tipSplinter Review
Attachment #355905 - Attachment is obsolete: true
two things 
a)
onSecurityChange is no longer fired on startup(i believe that's due to mfinkle's if (!firstTab) guard in selectedTab

b) is Browser.currentTab a typo? The only reference to that is in your patch.
perhaps you meant selectedTab?
Yeah, should be selectedTab - that change was committed after I wrote the patch (bug 468880).
Since you added a hook to so many methods, i suggest using _selectedTab directly to save cpu time. With that change, the performance impact of the patch on startup is negligible.
Er, the getter has a measurable impact!? It just returns _selectedTab directly...
I think this is no longer relevant.
Assignee: gavin.sharp → nobody
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: