Bug 24510 - Plugin Package function pointers are set up wrong
Summary: Plugin Package function pointers are set up wrong
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 03:54 PDT by Mihnea Ovidenie
Modified: 2009-05-20 10:36 PDT (History)
4 users (show)

See Also:


Attachments
First version of patch (3.00 KB, patch)
2009-03-11 10:00 PDT, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff
Bugfix + TestCase (14.62 KB, patch)
2009-05-14 04:52 PDT, Holger Freyther
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihnea Ovidenie 2009-03-11 03:54:02 PDT
Hello,

In file PluginPackageMac.cpp, function load, two function pointers are set in wrong way:

m_browserFuncs.hasproperty = _NPN_HasMethod; 
m_browserFuncs.hasmethod = _NPN_HasProperty;

The right way to set them should be:
m_browserFuncs.hasproperty = _NPN_HasProperty; 
m_browserFuncs.hasmethod = _NPN_HasMethod;

Also, the same problem can be found in PluginPackageGtk.cpp and PluginPackageQt.cpp.

Regards,
Mihnea
Comment 1 Mihnea Ovidenie 2009-03-11 10:00:42 PDT
Created attachment 28483 [details]
First version of patch

Made a small patch by setting the function pointers in the right way. The patch does not contain any test for the moment. Is there any layout test necessary for such patch?

Regards,
Mihnea
Comment 2 Darin Adler 2009-03-11 10:03:39 PDT
Comment on attachment 28483 [details]
First version of patch

We do have plug-in tests in our regression test suite. So you could indeed make a regression test for this, and I think it would be a good idea.
Comment 3 Mihnea Ovidenie 2009-04-08 11:49:14 PDT
(In reply to comment #2)
> (From update of attachment 28483 [details] [review])
> We do have plug-in tests in our regression test suite. So you could indeed make
> a regression test for this, and I think it would be a good idea.
> 

This issue is already fixed in the mac version of WebKit. Currently it affects only Qt/Gtk builds. Can i build Qt/Gtk on Mac in order to test a possible unit test?
Comment 4 Simon Hausmann 2009-04-14 13:09:22 PDT
Your patch looks great!

The Qt build currently does not build the test netsacpe plugin for the plugin layout tests, but the Gtk port does. (and they seem to all pass except for one test)

Comment 5 Eric Seidel (no email) 2009-05-11 06:31:49 PDT
Comment on attachment 28483 [details]
First version of patch

This definitely needs a test case. I assume it should be possible to modify test_plugin in DumpRenderTree to test this?
Comment 6 Holger Freyther 2009-05-12 07:38:08 PDT
I agree with Eric, I'm in the process of creating a test...
Comment 7 Mihnea Ovidenie 2009-05-12 07:42:18 PDT
(In reply to comment #6)
> I agree with Eric, I'm in the process of creating a test...
> 

Thanks, time for me to learn :)
Comment 8 Holger Freyther 2009-05-14 04:52:23 PDT
Created attachment 30332 [details]
Bugfix + TestCase

While doing the test case I found that _NPN_HasMethod is a bit too liberal in declaring things as a function. This was changed within the patch, but I'm not sure about the correctness.
Comment 9 Anders Carlsson 2009-05-18 10:34:06 PDT
Comment on attachment 30332 [details]
Bugfix + TestCase

r=me on everything except the _NPN_HasMethod change. Let's file a separate bug about that.
Comment 10 Holger Freyther 2009-05-20 09:10:43 PDT
I created bug #25891 for the NPN_HasMethod issue.
Comment 11 Holger Freyther 2009-05-20 10:36:25 PDT
Landed in r43923.