Closed Bug 1475387 Opened Last year Closed Last year

Port bug 1472087 - DeCOMtaminate nsIDocShellLoadInfo

Categories

(MailNews Core :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 63.0

People

(Reporter: jorgk, Assigned: jorgk)

References

Details

Attachments

(1 file, 2 obsolete files)

mailnews/base/src/nsMessenger.cpp:50:10: fatal error: 'nsIDocShellLoadInfo.h' file not found - and two more of those.

mailnews/base/util/nsMsgMailNewsUrl.cpp:840:34: error: cannot initialize a parameter of type 'nsDocShellLoadInfo *' with an lvalue of type 'nsIDocShellLoadInfo *'
Attached patch 1475387-load-info.patch - WIP (obsolete) — Splinter Review
Kyle and Nika: I started porting this to TB, but simply including nsDocShellLoadInfo.h already gives compile errors:

 0:48.86 m:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\nsDocShellLoadInfo.h(97): error C2039: 'ReferrerPolicy': is not a member of 'mozilla::net'
 0:48.86 m:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\nsNetUtil.h(969): note: see declaration of 'mozilla::net'
 0:48.86 m:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\nsDocShellLoadInfo.h(97): error C2061: syntax error: identifier 'ReferrerPolicy'
 0:48.86 m:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\nsDocShellLoadInfo.h(170): error C2039: 'ReferrerPolicy': is not a member of 'mozilla::net'
 0:48.86 m:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\nsNetUtil.h(969): note: see declaration of 'mozilla::net'
 0:48.86 m:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\nsDocShellLoadInfo.h(170): error C3646: 'mReferrerPolicy': unknown override specifier
 0:48.86 m:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\nsDocShellLoadInfo.h(170): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 0:48.86 m:/mozilla-source/comm-central/comm/mailnews/base/src/nsMessenger.cpp(592): error C2039: 'loadNormal': is not a member of 'nsDocShellLoadInfo'
 0:48.86 m:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\nsIMsgMailNewsUrl.h(49): note: see declaration of 'nsDocShellLoadInfo'
 0:48.86 m:/mozilla-source/comm-central/comm/mailnews/base/src/nsMessenger.cpp(592): error C2065: 'loadNormal': undeclared identifier
 0:48.88 mozmake[4]: *** [m:/mozilla-source/comm-central/config/rules.mk:1054: nsMessenger.obj] Error 2
 0:48.88 mozmake[4]: *** Waiting for unfinished jobs....

What am I missing?
Flags: needinfo?(nika)
Flags: needinfo?(kyle)
Looks like you should include mozilla/net/ReferrerPolicy.h.
Yeah, I'm guessing this is yet another "oops our unified builds brought in different includes" problem. I would suspect Comment 2 will fix it.
Flags: needinfo?(kyle)
Yes, it does, but I still get:
nsMessenger.cpp(593): error C2039: 'loadNormal': is not a member of 'nsDocShellLoadInfo'

So where does this come from and what else are you not including that you should :-(
(Trying to get back up and running at close to 1 AM.)
Flags: needinfo?(kyle)
I think this compiles now if I comment out the:

// loadInfo->SetLoadType(nsDocShellLoadInfo::loadNormal);

due to 'loadNormal': is not a member of 'nsDocShellLoadInfo'. Somehow it works for you:

https://hg.mozilla.org/mozilla-central/rev/e9df2dcfe09f#l2.32
Assignee: nobody → jorgk
Attachment #8991753 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Oof ok this is my fault for forgetting to check the comm-central repo before landing, sorry about that. :(

nsIDocShellLoadInfo::loadNormal would now be LOAD_NORMAL, from nsDocShellLoadTypes.h LoadType enum (which is un-namespaced and basically acts as a global. :( ). That'll be the same with nsIDocShellLoadInfo::loadLink moving to LOAD_LINK.

Finally, in nsIMsgMailNewsUrl.idl, you should change nsIDocShellLoadInfo to use the same native type for LoadInfo as we now use in nsIDocShell.idl.

Let me know if you have any other questions, or if you want me to try to get the build/patch working on my end.

As for Comment 5, that's incorrect. This is a set of 6 patches (that I forgot to squash :( ) and that changes multiple times in the patch set. By the 6th patch, nsDocShellLoadInfo::LoadType no longer exists.
Flags: needinfo?(kyle)
Done.
Attachment #8991756 - Attachment is obsolete: true
Flags: needinfo?(nika)
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/3d4ade0b6f43
Port bug 1472087: Replace use of nsIDocShellLoadInfo. rs=bustage-fix
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 63.0
Version: 60 → Trunk
Comment on attachment 8991759 [details] [diff] [review]
1475387-load-info.patch (v3)

Kyle, you could check that I got this right. The landed version has
  RefPtr<nsDocShellLoadInfo> loadInfo = new nsDocShellLoadInfo();
in nsNntpService.cpp.
Attachment #8991759 - Flags: review?(kyle)
Comment on attachment 8991759 [details] [diff] [review]
1475387-load-info.patch (v3)

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

LGTM. I'll add a followup on my end to include ReferrerPolicy in nsDocShellLoadInfo, but this is fine for now.
Attachment #8991759 - Flags: review?(kyle) → review+
Depends on: 1493662
You need to log in before you can comment on or make changes to this bug.