Bug 1654064 Comment 4 Edit History

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

(In reply to Gary Chen [:xeonchen] from comment #3)
> 
> According to the AntiTracking log, it shows the permission was not saved because [the parent window context is not a 3rd-party window](https://searchfox.org/mozilla-central/rev/227f22acef5c4865503bde9f835452bf38332c8e/toolkit/components/antitracking/ContentBlocking.cpp#263).
> 
> Dimi or Baku may have some comments?

Right, I think this is because `window.open` is called in a first-party iframe, but our heuristic uses 3rd-party logic code path because it is not top-level.
I guess the solution could be replacing top-level check [here](https://searchfox.org/mozilla-central/rev/227f22acef5c4865503bde9f835452bf38332c8e/toolkit/components/antitracking/ContentBlocking.cpp#233) with first-party check.
(In reply to Gary Chen [:xeonchen] from comment #3)
> 
> According to the AntiTracking log, it shows the permission was not saved because [the parent window context is not a 3rd-party window](https://searchfox.org/mozilla-central/rev/227f22acef5c4865503bde9f835452bf38332c8e/toolkit/components/antitracking/ContentBlocking.cpp#263).
> 
> Dimi or Baku may have some comments?

Right, I think this is because `window.open` is called in a first-party iframe, but our heuristic uses 3rd-party logic code path because the parent context is not a top-level.
I guess the solution could be replacing top-level check [here](https://searchfox.org/mozilla-central/rev/227f22acef5c4865503bde9f835452bf38332c8e/toolkit/components/antitracking/ContentBlocking.cpp#233) with first-party check.

Back to Bug 1654064 Comment 4