Closed Bug 1540398 Opened 5 years ago Closed 5 years ago

Port bug 1539356: More functions in Core::Editor are MOZ_CAN_RUN_SCRIPT now

Categories

(MailNews Core :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 68.0

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

References

Details

Attachments

(1 file)

Sorry for making your unexpected job due this kind of bugs. I guess that this is the biggest change because a lot of methods are now marked as MOZ_CAN_RUN_SCRIPT. Perhaps, follow up patches would reach one of them in most cases.

It's no problem, I can easily follow this. And I see the errors in the local compile.

How do you mark nsMsgCompose::SetIdentity() properly, which comes from
https://dxr.mozilla.org/comm-central/rev/2a29ee0adb310b54a6a2df72034953fed8f2b043/comm/mailnews/compose/public/nsIMsgCompose.idl#184
attribute nsIMsgIdentity identity;?

Sorry about the messy patch, I fixed some NS_IMETHOD(IMP) declarations which were wrong.

Attachment #9054685 - Flags: review?(masayuki)
Comment on attachment 9054685 [details] [diff] [review]
1540398-MOZ_CAN_RUN_SCRIPT.patch

Thanks, but that doesn't compile:
error: functions marked as MOZ_CAN_RUN_SCRIPT cannot override functions that are not marked MOZ_CAN_RUN_SCRIPT
Something needs to go into the IDL. Looks like you can actually put `[can_run_script]` in front of an attribute. That compiles, but later on, I get problems in JS Account, the same which are described in bug 1536535. So we need so stay with `MOZ_CAN_RUN_SCRIPT_BOUNDARY` for now.

I won't burden you with the review, I'll move it to BenC. Anyway, that needs to land soon as "bustage fix".
Attachment #9054685 - Flags: review?(masayuki) → review?(benc)

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/cb02187d7568
Port bug 1539356: mark more functions MOZ_CAN_RUN_SCRIPT. rs=bustage-fix

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 68.0
Version: 60 → Trunk
Comment on attachment 9054685 [details] [diff] [review]
1540398-MOZ_CAN_RUN_SCRIPT.patch

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

Looks good to me.
(And I'm curious now to know how many other places NS_IMETHOD is used erroneously!).
Attachment #9054685 - Flags: review?(benc) → review+

MS VS 2015(?) used to complain since NS_IMETHOD and nsresult are different types. I wonder why it didn't complain back then.

Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: