Bug 12615
| Summary: | NPN_InvokeDefault() on saved function() doesn't work. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | William Bardwell <wbardwel> |
| Component: | Plug-ins | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | ap |
| Priority: | P2 | ||
| Version: | 416.x | ||
| Hardware: | PC | ||
| OS: | OS X 10.4 | ||
William Bardwell
I have a property on the object returned by NPP_GetValue(NPPVpluginScriptableNPObject) that the JavaScript in my
HTML page sets to a function. I do an NPN_RetainObject() on what
JavaScript passes to the property setting function but when I later
try to call that function pointer with the NPN_InvokeDefault(<NPP that
object was made with>, <saved function pointer>, NULL, 0, <an
NPVariant>); it fails.
And nothing is put in the JavaScript console about why it failed, so I
have no idea what the problem is.
I found a workaround, which is to call "call" using NPN_Invoke() on
the function as the object and "call" as the method, which does work.
But this case is what NPN_InvokeDefault() is for, so it should work.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
Hi William, please test this against WebKit ToT (tip-of-tree) to find out if the bug still exists. A stand-alone test case (code and/or HTML) would also help to get this bug fixed quicker. Thanks!
http://webkit.org/building/checkout.html
William Bardwell
This works in a recent nightly.