Open Bug 638038 Opened 13 years ago Updated 2 years ago

JS_TriggerOperationCallback should pass a 'void *' to the callback function

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: jimb, Unassigned)

References

(Blocks 1 open bug)

Details

When triggering the operation callback function explicitly via JS_TriggerOperationCallback or its friends, it would be nice to have a re-entrant way to tell the callback function *why* it was being invoked.

At the moment, the operation callback function takes a single argument, the context as whose operation callback it was installed. I would like to extend it to take a 'void *' argument as well.

- When the callback is being invoked because the operation limit has expired or because JS_TriggerOperationCallback was called, this argument would be NULL.

- A new function, JS_SendToOperationCallback, would be like JS_TriggerOperationCallback, but take an additional 'void *' argument whose value would be passed through to the callback function. This value could be some sort of message indicating to the callback function what has happened.

If we don't mind changing the interface, we could just add the 'void *' argument to JS_TriggerOperationCallback itself.
Assignee: general → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.