-
Notifications
You must be signed in to change notification settings - Fork 80
Conversation
@@ -99,96 +100,86 @@ function onMessage(request, sender, sendResponse) { | |||
// spawn a new tab with pre-provided credentials | |||
if (request.action == "launch") { | |||
chrome.tabs.create({ url: request.url }, function(tab) { | |||
var tabLoaded = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see a particular use for tabLoaded
, given that we discard onAuthListener immediately after tab is loaded. Did you have a point for this that I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can go. I went through a couple of different versions of the bugfix; that was left over from one of them but is no longer applicable.
|
||
// mark tab as loaded & wipe credentials | ||
tabLoaded = true; | ||
request.username = request.password = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reference to this object is in this function and now in onAuthRequired
, as soon as both functions are gone the credentials are not accessible anyway - is there a point in additionally wiping them here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above - this was leftover from an earlier iteration of the bugfix; it can go.
- Use a shared tabs.onUpdated instead of subscribing multiple times - Extract onAuthRequired into a separate global function
3f67f02
to
baa90ca
Compare
Thanks @erayd for the confirmations, any other feedback before this is merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good - I like what you've done to it 👍
@maximbaz No other feedback at this point - I like what you've done, go ahead and merge it :-). |
@erayd I'll comment inline on a couple of particularly note-worthy points.