Closed Bug 1574823 Opened 1 year ago Closed 1 year ago

XUL overlay not loading for iframe (am-copies.xul)

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect
Not set
normal

Tracking

(thunderbird_esr6869+ fixed, thunderbird69 fixed, thunderbird70 fixed)

RESOLVED FIXED
Thunderbird 70.0
Tracking Status
thunderbird_esr68 69+ fixed
thunderbird69 --- fixed
thunderbird70 --- fixed

People

(Reporter: dlech, Assigned: darktrojan)

References

Details

Attachments

(2 files)

I'm trying to migrate an extension that uses XUL overlays to TB 68 (using linux x86_64 build3 en-US). There are several overlays that just add <script/> elements and these seem to be working, but there is an overly for chrome://messenger/content/am-copies.xul that does not seem to be loading. I have a hunch this is because it is an iframe within chrome://messenger/content/AccountManager.xul rather than a top level document.

I tried to set a debug breakpoint at https://dxr.mozilla.org/comm-release/source/mail/components/extensions/parent/ext-legacy.js#178 to see if we get a callback for am-copies.xul, but I just get the error message "chrome://messenger/content/messenger.xul : Unable to run script because scripts are blocked internally." and TB becomes unusable and has to be restarted.

Ref: https://github.com/dlech/AutoSaveDraftsFolders/pull/8

Blocks: 1476259

Yes, we're checking to see if the window has been seen before, instead of checking to see if the document has been seen before. That can be fixed.

Assignee: nobody → geoff
Status: NEW → ASSIGNED

This patch won't apply on beta or ESR but let's get it reviewed first.

Attachment #9086305 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9086305 [details] [diff] [review]
1574823-overlay-docs-not-wins-1.diff

Review of attachment 9086305 [details] [diff] [review]:
-----------------------------------------------------------------

Looks ok to me, r=mkmelin
Attachment #9086305 - Flags: review?(mkmelin+mozilla) → review+

If this is not landing in ESR, can you advice how to work around this?

Keywords: checkin-needed
Attachment #9086305 - Flags: approval-comm-esr68?
Attachment #9086305 - Flags: approval-comm-beta?

(In reply to John Bieling (TbSync) from comment #4)

If this is not landing in ESR, can you advice how to work around this?

You could reimplement the piece I'm changing in an extension's code, but that's not a very nice option.

Comment on attachment 9086305 [details] [diff] [review]
1574823-overlay-docs-not-wins-1.diff

If the patch doesn't apply, no point approving it, right. I'll stick the flags onto the right patch.
Attachment #9086305 - Flags: approval-comm-esr68?
Attachment #9086305 - Flags: approval-comm-beta?

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/8519bb801394
When loading overlays, check if the document, not the window, has been seen before. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 70.0

Oh right, that's why I didn't set those flags earlier.

Attachment #9086349 - Flags: review+
Attachment #9086349 - Flags: approval-comm-esr68?
Attachment #9086349 - Flags: approval-comm-beta?
Comment on attachment 9086349 [details] [diff] [review]
1574823-overlay-docs-not-wins-esr1.diff

Thanks.
Attachment #9086349 - Flags: approval-comm-beta? → approval-comm-beta+
Attachment #9086349 - Flags: approval-comm-esr68? → approval-comm-esr68+
You need to log in before you can comment on or make changes to this bug.