Closed Bug 948753 Opened 11 years ago Closed 11 years ago

Annotate sane nsISupports virtual methods

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: sfink, Assigned: sfink)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

There are some calls like nsISupports::GetCurrentJSContext that theoretically could be overridden with something that can GC, but really won't be in practical terms.
This patch adds a way to say, "while *most* virtual methods on nsISupports subclasses could do be overridden with something crazy, this particular one won't be". This allows the analysis to treat it like any other virtual method and find all implementations of that virtual. This is a relatively safe annotation, since if someone happens to override it later with something that can GC, the analysis will see it.
Attachment #8345625 - Flags: review?(bhackett1024)
Comment on attachment 8345625 [details] [diff] [review]
Annotate sane nsISupports virtual methods

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

::: js/src/devtools/rootAnalysis/computeCallgraph.js
@@ +281,2 @@
>      for (var body of functionBodies)
> +        processBody(functionName, body);

This seems unrelated to the rest of the patch.
Attachment #8345625 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/0c936908a2fa
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: