Closed Bug 257191 Opened 20 years ago Closed 20 years ago

Add NPN_InvokeDefault(), and rename NPN_Call() to NPN_Invoke() for consistency with other parts of the API

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jst, Assigned: jst)

References

Details

(Keywords: fixed-aviary1.0, fixed1.7.5)

Attachments

(2 files)

Per discussion in the plugin group, we decided to add an NPN_InvokeDefault() method to the npruntime API, and while we're at it, we're renaming NPN_Call() to NPN_Invoke() for the name to be consistent with the NPClass invoke hook, and with the new method. And while I was at it, I fixed a bug with getting properties exposed by plugins when the plugin is accessed through the DOM. Patch coming up.
Attached patch FixSplinter Review
Attachment #157204 - Flags: superreview?(brendan)
Attachment #157204 - Flags: review?(brendan)
*** Bug 254280 has been marked as a duplicate of this bug. ***
Comment on attachment 157214 [details] [diff] [review] Pass the right 'this' parameter to JS_CallFunctionValue() in nsHTMLExternalObjSH::Call() Nit: hanging indent off by 3: + ok = ::JS_DefineElement(cx, obj, JSVAL_TO_INT(id), JSVAL_VOID, nsnull, + nsnull, JSPROP_ENUMERATE); Note for the plugin spec: we need to say what |this| binds to in JS, how it follows the usual |this|-binding rules. It could be that others make the default method's |this| always be the callable object itself, or some other "bound object" instead of what's determined by the usual JS rules. Gotta get agreement. r+sr=brendan@mozilla.org. /be
Attachment #157214 - Flags: superreview+
Attachment #157214 - Flags: review+
Fix checked in on the trunk.
Status: NEW → ASSIGNED
Comment on attachment 157214 [details] [diff] [review] Pass the right 'this' parameter to JS_CallFunctionValue() in nsHTMLExternalObjSH::Call() a=asa for aviary checkin.
Attachment #157214 - Flags: approval-aviary+
Fixed on the aviary branch as well.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
Attachment #157204 - Flags: superreview?(brendan)
Attachment #157204 - Flags: review?(brendan)
Keywords: fixed1.7.5
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: