Port |Bug 1414974 - Convert external consumers of nsGlobalWindow to instead use nsGlobalWindow{Inner,Outer}| to mailnews| - mailnews/base/src/nsMessengerOSXIntegration.mm:498:25: error: no member named 'Cast' in 'nsGlobalWindow'

RESOLVED FIXED in Thunderbird 58.0

Status

MailNews Core
Backend
RESOLVED FIXED
10 days ago
10 days ago

People

(Reporter: Jorg K [Almost not working on Thunderbird (some bustage-fix only) due to non-renewal of contract], Assigned: frg)

Tracking

Trunk
Thunderbird 58.0

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Thunderbird-testfailure: B Mac only])

Attachments

(1 attachment)

Hi Boris, we meet again ;-)

Today I'm seeing this bustage
mailnews/base/src/nsMessengerOSXIntegration.mm:498:25: error: no member named 'Cast' in 'nsGlobalWindow'
from the code snippet you provided the other day:

https://dxr.mozilla.org/comm-central/rev/952762964f408e33d060dd1110cac0626ae5fa51/mailnews/base/src/nsMessengerOSXIntegration.mm#498

  nsCOMPtr<nsIWindowMediator> mediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
  if (mediator)
  {
    nsCOMPtr<mozIDOMWindowProxy> domWindow;
    mediator->GetMostRecentWindow(u"mail:3pane", getter_AddRefs(domWindow));
    if (domWindow)
    {
      nsPIDOMWindowOuter* outer = nsPIDOMWindowOuter::From(domWindow);
      nsPIDOMWindowInner* inner = outer->GetCurrentInnerWindow();
      if (inner) {
        mozilla::IgnoredErrorResult rv;
498     nsGlobalWindow::Cast(inner)->GetAttention(rv);
      }
    }
  }

Could you indicate what we need to change here. Sorry, I have many other things to do and don't want to invest the time to investigate this ... and I don't have a Mac to try it either.
Flags: needinfo?(nika)
Flags: needinfo?(bzbarsky)
Summary: Port |Bug 1414974 - Convert external consumers of nsGlobalWindow to instead use nsGlobalWindow{Inner,Outer}| to mailnews - mailnews/base/src/nsMessengerOSXIntegration.mm:498:25: error: no member named 'Cast' in 'nsGlobalWindow' → Port |Bug 1414974 - Convert external consumers of nsGlobalWindow to instead use nsGlobalWindow{Inner,Outer}| to mailnews| - mailnews/base/src/nsMessengerOSXIntegration.mm:498:25: error: no member named 'Cast' in 'nsGlobalWindow'
(Assignee)

Comment 1

10 days ago
Hmm maybe 

> nsGlobalWindowInner::Cast(inner)->GetAttention(rv);
(In reply to Frank-Rainer Grahl (:frg) from comment #1)
> Hmm maybe 
> 
> > nsGlobalWindowInner::Cast(inner)->GetAttention(rv);

This is correct. I'm working on splitting nsGlobalWindow, and you have to specify whether you want the inner or outer version now.
Flags: needinfo?(nika)
Thanks, I'll fix this now.
Flags: needinfo?(bzbarsky)
Created attachment 8927368 [details] [diff] [review]
1416217.patch

I'm taking a lot of liberties here: FRG as the author and Nika as the reviewer. I hope you don't mind.

Comment 5

10 days ago
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/9cc2f2a255d0
Port bug 1414974 to mailnews: Convert consumers of nsGlobalWindow to use nsGlobalWindow{Inner,Outer}. r=mystor
Status: NEW → RESOLVED
Last Resolved: 10 days ago
Resolution: --- → FIXED
Assignee: nobody → frgrahl
Target Milestone: --- → Thunderbird 58.0
You need to log in before you can comment on or make changes to this bug.