Closed Bug 1534575 Opened 3 years ago Closed 3 years ago

Port bug 1534363 - mailnews/compose/src/nsMsgComposeService.cpp:362:22: error: functions marked as MOZ_CAN_RUN_SCRIPT cannot override functions that are not marked MOZ_CAN_RUN_SCRIPT

Categories

(MailNews Core :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 67.0

People

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

Details

Attachments

(1 file)

mailnews/compose/src/nsMsgComposeService.cpp:362:22: error: functions marked as MOZ_CAN_RUN_SCRIPT cannot override functions that are not marked MOZ_CAN_RUN_SCRIPT

Not sure what needs to be done here.

Can you Linux guys please take a look. It compiles on Windows and I prefer not to do this with "trial and error" on try.

Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(geoff)
Flags: needinfo?(benc)
Flags: needinfo?(acelists)

Wow, Windows in automation fails as well while it works locally. What's going on?

Ben, you like digging around this stuff. What is this good for?

Sorry about the noise, guys, I'm done here.

Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(geoff)
Flags: needinfo?(benc)
Flags: needinfo?(acelists)
Attachment #9050274 - Flags: review?(benc)

https://hg.mozilla.org/comm-central/rev/f79b60fb833f19ca091c9f209f40ad453c991546
add [can_run_script] to nsIMsgComposeService.OpenComposeWindow(). rs=bustage-fix

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 67.0
Version: 60 → Trunk
Comment on attachment 9050274 [details] [diff] [review]
1534575-script2.patch

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

From what I can tell, `[can_run_script]` in the IDL gets translated to `MOZ_CAN_RUN_SCRIPT` in front of the function declaration.
This evaluates to nothing unless you're using a static analysis plugin - either MOZ_CLANG_PLUGIN or [sixgill](http://sixgill.org/).
With a static analysis plugin active, it decorates the function with `__attribute__((annotate("moz_can_run_script")))`, which I guess tells the static analysis that this function is allowed to call out to javascriptland?
And it looks like there's a static-analysis rule to ensure derived functions have the same moz_can_run_script decoration, which seems reasonable enough.
Attachment #9050274 - Flags: review?(benc) → review+
Type: defect → task
You need to log in before you can comment on or make changes to this bug.