Closed Bug 283878 Opened 19 years ago Closed 7 years ago

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

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: rgammon, Assigned: jst)

References

Details

Attachments

(3 files, 1 obsolete file)

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
Attachment #175678 - Flags: review?(jst)
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-
Attachment #175858 - Flags: superreview?(bzbarsky)
Attachment #175858 - Flags: review?(rgammon)
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+
Can a suitably empowered person assign this to jst? His patch here is ready to
go in from my POV.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Hmm, it seems I can mark as fixed, but can't assign....
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Attachment #175858 - Flags: review?(rgammon) → review+
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/
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
+/* 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.
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)
Attached patch PatchSplinter Review
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)
Attachment #213722 - Flags: review?(jst)
Comment on attachment 213722 [details] [diff] [review]
Patch

This plugin is obsolete by now :(
Status: NEW → RESOLVED
Closed: 19 years ago7 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: