Update mozilla/modules/plugin/tools/sdk/samples/common for npruntime

RESOLVED INCOMPLETE

Status

()

Core
Plug-ins
RESOLVED INCOMPLETE
13 years ago
10 months ago

People

(Reporter: Ryan Gammon, Assigned: jst)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922

The following patch updates mozilla/modules/plugin/tools/sdk/samples/common for
npruntime.

Reproducible: Always
(Reporter)

Comment 1

13 years ago
Created attachment 175678 [details] [diff] [review]
update plugin sdk for npruntime
(Reporter)

Updated

13 years ago
Attachment #175678 - Flags: review?(jst)
(Assignee)

Comment 2

13 years ago
Comment on attachment 175678 [details] [diff] [review]
update plugin sdk for npruntime

This patch is all good, except for the fact that it uses the LOBYTE macro which
is AFAIK win32 only.

I'll add npapi specific macros for this, and I'll also add a #define to npapi
for the version where npruntime was added.
Attachment #175678 - Flags: review?(jst) → review-
(Assignee)

Comment 3

13 years ago
Created attachment 175858 [details] [diff] [review]
Same as above w/ more #defines and some additional plugin code cleanup.
Attachment #175858 - Flags: superreview?(bzbarsky)
Attachment #175858 - Flags: review?(rgammon)
(Reporter)

Comment 4

13 years ago
Looks good to me -- I don't think I have the permissions to review+ though (or
maybe I'm missing something?).

There's a call to HIBYTE(aNPNFuncs->version) in np_entry.cpp that you could
replace with NP_GET_VERSION_MAJOR for consistancy.
Comment on attachment 175858 [details] [diff] [review]
Same as above w/ more #defines and some additional plugin code cleanup.

>Index: modules/plugin/base/src/ns4xPlugin.cpp
>-  // version is a uint16 so cast to int to avoid an invalid
>-  // comparison due to limited range of the data type

Your code will trigger that compile warning, no?  It's checking whether a
PRUint16 is less than 0.....  Perhaps cast return value of NP_GET_VERSION_MAJOR
to int to avoid it?

The rest looks ok to me, though I don't really know this code that well...  I
assume it's ok that we're storing all these functions on what looks like a
singleton (NPNFuncs)?
Attachment #175858 - Flags: superreview?(bzbarsky) → superreview+
(Reporter)

Comment 6

13 years ago
Can a suitably empowered person assign this to jst? His patch here is ready to
go in from my POV.
(Reporter)

Updated

13 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
(Reporter)

Comment 7

13 years ago
Hmm, it seems I can mark as fixed, but can't assign....
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
(Reporter)

Updated

13 years ago
Attachment #175858 - Flags: review?(rgammon) → review+
(Reporter)

Updated

13 years ago
Assignee: nobody → jst
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
(Reporter)

Comment 9

13 years ago
Adding a comment so this doesn't get automatically closed.

This bug contains a patch that needs to be landed.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 10

12 years ago
+/* The npapi version number (major/minor) where npruntime support was
+   added */
+#define NP_VERSION_NPRUNTIME ((0 << 8) | 14)
Since the MACRO NP_VERSION_MINOR has change, so maybe this MACRO should be changed accordingly.

-  NS_ASSERTION(HIBYTE(fCallbacks.version) >= NP_VERSION_MAJOR, "callback version is less than NP version");
+  NS_ASSERTION(NP_GET_VERSION_MAJOR(fCallbacks.version) >= NP_VERSION_MAJOR,
+               "callback version is less than NP version");
This part has been changed.

-  if(error != NPERR_NO_ERROR || ((fCallbacks.version >> 8) < NP_VERSION_MAJOR))
+  if(error != NPERR_NO_ERROR ||
+     NP_GET_VERSION_MAJOR(fCallbacks.version) < NP_VERSION_MAJOR)
     return;
This part has been removed.

-  // wrap all plugin entry points tvectors as mach-o callable function pointers.
+  // wrap all plugin entry points tvectors as mach-o callable function
+  // pointers.
This part has been changed.

if(HIBYTE(aNPNFuncs->version) > NP_VERSION_MAJOR)
     return NPERR_INCOMPATIBLE_VERSION_ERROR;
Replace HIBYTE with NP_GET_VERSION_MAJOR

+NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
+{
+  NPIdentifier identifier = NULL;
+  if(aNPNFuncs->version >= NP_VERSION_NPRUNTIME)
+  {
+    identifier = NPNFuncs.getstringidentifier(name);
+  }
+  return identifier;
+}
No variable "aNPNFuncs" in this function, use NPNFuncs instead. The same problem  exists in the next several functions in the patch.

Comment 11

12 years ago
Created attachment 206485 [details] [diff] [review]
Updated patch based on the patch provided by jst

It seems that the patch has been approved, but hasn't been checked in. When trying to fix bug 254980, I found some problems in jst's patch. So update it.
Attachment #206485 - Flags: review?(jst)

Comment 12

12 years ago
Created attachment 213722 [details] [diff] [review]
Patch

Update the latest patch based on jst's patch and the enumeration checkin.
Attachment #206485 - Attachment is obsolete: true
Attachment #213722 - Flags: review?(jst)
Attachment #206485 - Flags: review?(jst)
(Assignee)

Updated

8 years ago
Attachment #213722 - Flags: review?(jst)
(Assignee)

Comment 13

8 years ago
Comment on attachment 213722 [details] [diff] [review]
Patch

This plugin is obsolete by now :(

Updated

10 months ago
Status: NEW → RESOLVED
Last Resolved: 13 years ago10 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.