Last Comment Bug 773958 - Fix calling convention conflicts of NPN_xxx funciton pointer
: Fix calling convention conflicts of NPN_xxx funciton pointer
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Plug-ins (show other bugs)
: Trunk
: x86 OS/2
: -- normal (vote)
: mozilla17
Assigned To: KO Myung-Hun
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-14 06:59 PDT by KO Myung-Hun
Modified: 2012-08-23 19:21 PDT (History)
5 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Prepend NP_CALLBACK to NPN_xxx function pointers (14.56 KB, patch)
2012-07-14 07:02 PDT, KO Myung-Hun
benjamin: review-
Details | Diff | Review
Remove NP_CALLBACK from nsNPAPIPlugin.h (1.03 KB, patch)
2012-07-14 09:53 PDT, KO Myung-Hun
jaas: review-
Details | Diff | Review
Define NP_CALLBACK as NP_LOADDS (972 bytes, patch)
2012-08-14 05:34 PDT, KO Myung-Hun
jaas: review+
Details | Diff | Review
Define NP_CALLBACK as NP_LOADDS v2 (1.74 KB, patch)
2012-08-16 20:28 PDT, KO Myung-Hun
jaas: review+
Details | Diff | Review

Description KO Myung-Hun 2012-07-14 06:59:53 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build ID: 20120614114901
Comment 1 KO Myung-Hun 2012-07-14 07:00:57 PDT
NPN_xxx function pointers should use NP_CALLBACK calling convention.
Comment 2 KO Myung-Hun 2012-07-14 07:02:47 PDT
Created attachment 642225 [details] [diff] [review]
Prepend NP_CALLBACK to NPN_xxx function pointers
Comment 3 Benjamin Smedberg [:bsmedberg] 2012-07-14 08:33:01 PDT
Comment on attachment 642225 [details] [diff] [review]
Prepend NP_CALLBACK to NPN_xxx function pointers

The NPAPI headers are now imported directly from the npapi-sdk project shared between vendors. Any patches to this need to be directed upstream.
Comment 4 Benjamin Smedberg [:bsmedberg] 2012-07-14 08:33:34 PDT
http://code.google.com/p/npapi-sdk/
Comment 5 KO Myung-Hun 2012-07-14 09:52:03 PDT
Thanks for your advice.

I've submitted a patch for npfunctions.h to the upstream.

And I attach a patch for nsNPAPIPlugin.h, here.
Comment 6 KO Myung-Hun 2012-07-14 09:53:09 PDT
Created attachment 642246 [details] [diff] [review]
Remove NP_CALLBACK from nsNPAPIPlugin.h
Comment 7 Benjamin Smedberg [:bsmedberg] 2012-07-19 10:53:50 PDT
Comment on attachment 642246 [details] [diff] [review]
Remove NP_CALLBACK from nsNPAPIPlugin.h

I thought we removed NP_CALLBACK on purpose, so I'm going to bump this to josh.
Comment 8 Josh Aas 2012-07-30 12:55:11 PDT
Comment on attachment 642246 [details] [diff] [review]
Remove NP_CALLBACK from nsNPAPIPlugin.h

Review of attachment 642246 [details] [diff] [review]:
-----------------------------------------------------------------

We don't need to change this, we're not defining NP_CALLBACK in the NPAPI headers.
Comment 9 KO Myung-Hun 2012-08-14 05:34:25 PDT
Created attachment 651715 [details] [diff] [review]
Define NP_CALLBACK as NP_LOADDS
Comment 10 Ryan VanderMeulen [:RyanVM] 2012-08-16 14:55:16 PDT
Comment on attachment 642225 [details] [diff] [review]
Prepend NP_CALLBACK to NPN_xxx function pointers

Please mark obsolete patches as such before adding checkin-needed to a bug.
Comment 11 Ryan VanderMeulen [:RyanVM] 2012-08-16 16:20:33 PDT
This also fails to build.

https://tbpl.mozilla.org/php/getParsedLog.php?id=14448366&tree=Try

PluginModuleParent.cpp
cc1plus: warnings being treated as errors
In file included from /builds/slave/try-lnx/build/dom/plugins/ipc/PluginModuleChild.cpp:46:0:
/builds/slave/try-lnx/build/dom/plugins/ipc/../base/nsNPAPIPlugin.h:23:0: error: "NP_CALLBACK" redefined
../../../dist/include/mozilla/plugins/PluginModuleChild.h:46:0: note: this is the location of the previous definition
cc1plus: warnings being treated as errors
In file included from /builds/slave/try-lnx/build/dom/plugins/ipc/PluginScriptableObjectUtils.h:11:0,
                 from /builds/slave/try-lnx/build/dom/plugins/ipc/PluginIdentifierParent.cpp:12:
/builds/slave/try-lnx/build/dom/plugins/ipc/PluginModuleChild.h:46:0: error: "NP_CALLBACK" redefined
/builds/slave/try-lnx/build/dom/plugins/ipc/../base/nsNPAPIPlugin.h:23:0: note: this is the location of the previous definition

Please include a link to passing Try results when requesting checkin again.
Comment 12 KO Myung-Hun 2012-08-16 20:28:17 PDT
Created attachment 652662 [details] [diff] [review]
Define NP_CALLBACK as NP_LOADDS v2
Comment 13 Ryan VanderMeulen [:RyanVM] 2012-08-23 03:19:51 PDT
Green on Try. (The Windows test failure is unrelated to this patch)
https://tbpl.mozilla.org/?tree=Try&rev=bb4178a63464

https://hg.mozilla.org/integration/mozilla-inbound/rev/7a1ab48fc876
Comment 14 Ryan VanderMeulen [:RyanVM] 2012-08-23 19:21:46 PDT
https://hg.mozilla.org/mozilla-central/rev/7a1ab48fc876

Note You need to log in before you can comment on or make changes to this bug.