#2 consistent return vals
Merged by natenichols. Opened by billauger.
housekeeping1  into  master

Download 2.patch

click the links on the comment headers like: "29 of main_background.js" to see the comments in the code context

the add_popup_entry() function returns a Promise which returns the integer 1 if 'url' is undefined - or else it returns nothing - would it be more appropriate to return 0 here?

the update_popup() function is very similar to the add_popup_entry() function but it does not return anything - this may or may not be important

the get_sto() function declared within the add_popup_entry() function is passed as a callback to it's webex.storage.local.get() returns nothing

the get_sto() function declared within the update_popup() function is analogously passed as a call back to it's webex.storage.local.get() but it returns the integer 1 if 'url' is undefined

again that may or may not be important but it smells a thinko

as long as there is no bug here then np - in any case it is good to keep the return values self-consistent

notice the two added return here and in the previous function - here it follows the call to storage where in the previous function it is inside the callback - at first glance the asymetry make it look like a thinko - but you would know better if this is correct - i just wanted to point t out

the block_ga() function returns the blocking flag if test_GA() succeeds but does not return a value otherwise - that is unlike that other analogous onBeforeRequest event handlers that return an empty dict otherwise (like on diff line 158 below) - this should probably return {} also yes?

unnecessary return statement yes?

unnecessary return statement yes?

unnecessary return statement yes?

unnecessary return statement yes?

Pull-Request has been merged by natenichols

Metadata