Closed Bug 128464 Opened 23 years ago Closed 13 years ago

Type changes in headers could cause problems

Categories

(Core Graveyard :: Plug-ins, defect, P2)

x86
All
defect

Tracking

(Not tracked)

RESOLVED WONTFIX
mozilla1.3beta

People

(Reporter: mkaply, Assigned: peterlubczynski-bugs)

Details

(Whiteboard: [PL2:NA])

We have found a case where the structures in the old header (npapi.h) did not 
match the new header (nsplugindefs.h)

I'm not sure why these changes didn't cause problems with existing plugin 
printing.

My only guess is that plugin vendors caught the problem and worked around it.

Here is what I found:

NPBool (unsigned char) changed to PRBool (int)

in npapi.h (4.x code)

typedef unsigned char   NPBool; 
. 
. 
. 
typedef struct _NPFullPrint 
{ 
  NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ 
  NPBool printOne;       /* TRUE if plugin should print one copy to default 
printer */ 
  void* platformPrint; /* Platform-specific printing info */ 
} NPFullPrint; 

in nsplugindefs.h/nsplugindefs.idl, I see the following code: 

struct nsPluginFullPrint { 
    PRBool      pluginPrinted;  /* Set TRUE if plugin handled fullscreen */ 
                                /*  printing                             */ 
    PRBool      printOne;       /* TRUE if plugin should print one copy  */ 
                                /*  to default printer                   */ 
    void*       platformPrint;  /* Platform-specific printing info */ 
}; 

with PRBool defined as an int in prtypes.h

Note that at this point, the main problem we found with OS/2 plugin printing was 
that the pragma pack(1) for our structures was before an include of <os2.h> and 
<os2.h> undid the pragma pack(1). That was the first problem we found. We're 
continuing to look to see what else is causing problems, and this caught our 
eye.
this is a fairly major issue, setting this to be addressed in the next milestone
Severity: normal → major
Priority: -- → P2
Whiteboard: [PL2:NA]
Target Milestone: --- → mozilla1.2alpha
BTW, this only applies to fullscreen plugins - I've no idea why it hasn't caused
headaches already.
Severity: major → normal
Target Milestone: mozilla1.2alpha → mozilla1.0.2
adding nsbeta1+
Keywords: nsbeta1+
Target Milestone: mozilla1.0.2 → mozilla1.2alpha
Should we just switch from |nsPluginPrint| to |NPPrint| everywhere in our code?
How many plugins may have used nsplugindefs.h already? Java and Real -- none of
those two are normally full-page. What other approach can we try?
Target Milestone: mozilla1.2alpha → mozilla1.3alpha
moving to 1.3 beta, we need to work through a resolution on this one.
Target Milestone: mozilla1.3alpha → mozilla1.3beta
--->taking av's nsbeta1+ bugs
Assignee: av → peterlubczynski
QA Contact: shrir → plugins
I guess we didn't need to work through a resolution after all. This hasn't come up in 8 years of plugins.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.