Closed Bug 348247 Opened 18 years ago Closed 7 years ago

plugin's GetValue for NPPVpluginNeedsXEmbed called with different pointer types

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: chpe, Unassigned)

References

Details

Attachments

(1 file)

PRBool is an int, while NPBool is an unsigned char. The plugin's GetValue function is called with both PRBool* and NPBool*:

Called here with NPBool*: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/modules/plugin/base/src/ns4xPlugin.cpp&rev=1.139&mark=1802,1803#1802
1802 NPBool rtv = PR_FALSE;
1803 inst->GetValue((nsPluginInstanceVariable)NPPVpluginNeedsXEmbed, &rtv);

and here with PRBool*:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp&rev=1.7&mark=115,119#115
115 PRBool val = PR_FALSE;
118 rv = aPluginInstance->GetValue
119   ((nsPluginInstanceVariable)NPPVpluginNeedsXEmbed, &val);
Yes, that would have been the correct fix at original implementation but there are now plugins assuming that they can set 4 bytes for an int.

At least the inconsistency should be resolved in bug 731917.
Status: UNCONFIRMED → NEW
Depends on: 731917
Ever confirmed: true
Blocks: 189229
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: