Closed Bug 633833 Opened 9 years ago Closed 9 years ago

Add 'function' keyword to all the single function JSD interfaces

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: Gijs, Assigned: Gijs)

Details

Attachments

(1 file)

In particular:

jsdIActivationCallback
jsdINestCallback
jsdIFilterEnumerator
jsdIScriptEnumerator
jsdIContextEnumerator
jsdICallHook
jsdIErrorHook
jsdIExecutionHook


I'd even argue that onScriptCreated/onScriptDestroyed should be refactored to be a single function with an argument indicating whether a script was created or destroyed, but I suppose that is debatable, and would constitute an actual change in the interface...
(In reply to comment #0)
> ... and would constitute an actual
> change in the interface...

Which reminds me, I can do a patch, but would I need to regenerate the CIDs for these interfaces?
so, the problem is that a caller which relies on [function] being present will fail on a version where it isn't present, being able to detect that it needs to have an object is thus vaguely necessary.

note that if you do bump an iid, you need to bump the interfaces which use them as arguments/attributes/return types and iteratively for those changed interfaces.

i'm ok with you not bumping the iids for this case, someone can also detect the lack of this by trying with a function and if it throws, knowing that it needs to wrap.
Attached patch PatchSplinter Review
Good, here we go. :-)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #512130 - Flags: review?(timeless)
Attachment #512130 - Flags: review?(timeless) → review+
http://hg.mozilla.org/mozilla-central/rev/1a26bfb69598
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
You need to log in before you can comment on or make changes to this bug.