Bug 1690093 Comment 17 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` is a hack and will do wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some callers violate that, then they need to be fixed.

No need to be getting personal here.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some callers violate that, then they need to be fixed.

No need to be getting personal here.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some call stacks violate that assumption and don't pass in a `msgWindow` when they should, then they need to be fixed.

No need to be getting personal here.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some call stacks violate that assumption and don't pass in a `msgWindow` when they should, then they need to be fixed. But the window reference needs to be grabbed in the UI where the click happens.

No need to be getting personal here.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some call stacks violate that assumption and don't pass in a `msgWindow` when they should, then they need to be fixed. But the window reference needs to be grabbed in the UI where the click happens, and then passed on properly.

This is a classical problem. I've seen this bug a thousand times, in several projects.

No need to be getting personal here.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some call stacks violate that assumption and don't pass in a `msgWindow` when they should, then they need to be fixed. But the window reference needs to be grabbed in the UI where the click happens, and then passed on properly.

This is a classical problem. I've seen this bug a thousand times, in several projects.

No need to be getting personal here, nor vulgar.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some call stacks violate that assumption and don't pass in a `msgWindow` when they should, then they need to be fixed. But the window reference needs to be grabbed in the UI where the click happens, and then passed on properly.

This is a classical problem. I've seen this bug a thousand times, in several projects.

FWIW, why I did the review here: This is code that I wrote. Custom is that the author of code also has review rights. After all, I am a legal owner of this code. alta88, in contrast, has no standing here.

No need to be getting personal here, nor vulgar.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some call stacks violate that assumption and don't pass in a `msgWindow` when they should, then they need to be fixed. But the window reference needs to be grabbed in the UI where the click happens, and then passed on properly.

This is a classical problem. I've seen this bug a thousand times, in several projects.

FWIW, why I did the review here: This is code that I wrote. Custom is that the author of code also has review rights. After all, I am a legal owner of this code. alta88, in contrast, has no standing here.

My interest is simply to ensure that the code change doesn't break anything. No need to be getting personal here, nor vulgar.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some call stacks violate that assumption and don't pass in a `msgWindow` when they should, then they need to be fixed. But the window reference needs to be grabbed in the UI where the click happens, and then passed on properly.

This is a classical problem. I've seen this bug a thousand times, in several projects.

FWIW, why I did the review here: This is code that I wrote. Custom is that the author of code also has review rights. After all, I am a legal owner of this code. alta88, in contrast, has no standing here for this particular code.

My interest is simply to ensure that the code change doesn't break anything. No need to be getting personal here, nor vulgar.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some call stacks violate that assumption and don't pass in a `msgWindow` when they should, then they need to be fixed. But the window reference needs to be grabbed in the UI where the click happens, and then passed on properly.

This is a classical problem. I've seen this bug a thousand times, in several projects.

FWIW, why I did the review here: This is code that I wrote. I wrote the very line that's being modified here. Custom is that the author of code also has review rights. After all, I am a legal owner of this code.

My interest is simply to ensure that the code change doesn't break anything. No need to be getting personal here, nor vulgar.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some caller do not currently pass in a `msgWindow`, they should be fixed to do so. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. If some call stacks violate that assumption and don't pass in a `msgWindow` when they should, then they need to be fixed. But the window reference needs to be grabbed in the UI where the click happens, and then passed on properly.

This is a classical problem. I've seen this bug a thousand times, in several projects.

FWIW, why I did the review here: This is code that I wrote. I wrote the very line that's being modified here. Custom is that the author of code also has review rights. After all, I am a legal owner of this code. I'd rather you say thank-you than attack me for doing review duty.

My interest is simply to ensure that the code change doesn't break anything. No need to be getting personal here, nor vulgar.
> > You need to pass in the actual msgWindow where the end user directly initiated the operation, i.e. the user clicked into that exact window a second earlier. He must have contiously initiated the action that is triggering the prompt, in that exact window.

> This is obvious.

Glad you agree. That means you cannot use `getTopMostWindow()`, because - by very nature of the call - you cannot be sure that it's the same window that the user clicked in.

> if it is determined the request was user initiated

So, how do you determine this? By whether the original caller - where the click happened - passed a `msgWindow` in. That's how this code works. If some callers do not currently pass in a `msgWindow`, they should be fixed. If there are many, then well, there are many places to fix. All the better to straighten this out.

`getTopMostWindow()` will go wrong in a number of cases. And, most importantly, violates the assumption in this code that `msgWindow == null` means non-interactive. Just grabbing any window when we need a password, from the backend, irregardless of where the call comes from, is violating that contract. Instead, the window reference needs to be grabbed in the UI where the click happens, and then passed on properly.

This is a classical problem. I've seen this bug a thousand times, in several projects.

FWIW, why I did the review here: This is code that I wrote. I wrote the very line that's being modified here. Custom is that the author of code also has review rights. After all, I am a legal owner of this code. I'd rather you say thank-you than attack me for doing review duty.

My interest is simply to ensure that the code change doesn't break anything. No need to be getting personal here, nor vulgar.

Back to Bug 1690093 Comment 17