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

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: jorgk, Assigned: frg)

Tracking

Trunk
Thunderbird 58.0

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

a year ago
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)
(Reporter)

Updated

a year ago
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

a year ago
Hmm maybe 

> nsGlobalWindowInner::Cast(inner)->GetAttention(rv);

Comment 2

a year ago
(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)
(Reporter)

Comment 3

a year ago
Thanks, I'll fix this now.
Flags: needinfo?(bzbarsky)
(Reporter)

Comment 4

a year ago
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

a year 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: a year ago
Resolution: --- → FIXED
(Reporter)

Updated

a year ago
Assignee: nobody → frgrahl
Target Milestone: --- → Thunderbird 58.0
You need to log in before you can comment on or make changes to this bug.