Closed
Bug 535120
Opened 15 years ago
Closed 15 years ago
[OOPP] Calling NPN_GetValue for NPNVToolkit in NP_Initialize fails
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sparky, Assigned: benjamin)
References
Details
Attachments
(1 file)
1.08 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091215 Minefield/3.7a1pre Firefox/3.7 Build Identifier: I have a plugin that I've written, which tests for XEmbed support in NP_Initialize ( as suggested in https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins ) PRBool supportsXEmbed = PR_FALSE; NPError err1 = NPN_GetValue(NULL, NPNVSupportsXEmbedBool, (void*)&supportsXEmbed); NPNToolkitType toolkit = NPNVGtk12; NPError err2 = NPN_GetValue(NULL, NPNVToolkit, (void*)&toolkit); if(err1 != NPERR_NO_ERROR || err2 != NPERR_NO_ERROR) { NP_DEBUG("Unable to determine XEmbed support"); return NPERR_INCOMPATIBLE_VERSION_ERROR; } if(!supportsXEmbed || toolkit != NPNVGtk2) { NP_DEBUG("XEmbed not supported"); return NPERR_INCOMPATIBLE_VERSION_ERROR; } With OOPP disabled, this succeeds without error. However if I enable OOPP, it fails with "Unable to determine XEmbed support". I added some debug printouts to check the NPError values and I found that the NPNVToolkit call returned 2 (NPERR_INVALID_INSTANCE_ERROR) Is this intentional? Reproducible: Always
Assignee | ||
Comment 1•15 years ago
|
||
No, we apparently missed a case where you're allowed to call NPN_GetValue with a null npp.
Blocks: OOPP
Status: UNCONFIRMED → NEW
Component: IPC → Plug-ins
Ever confirmed: true
QA Contact: ipc → plugins
Summary: Calling NPN_GetValue for NPNVToolkit in NP_Initialize fails → [OOPP] Calling NPN_GetValue for NPNVToolkit in NP_Initialize fails
Assignee | ||
Comment 2•15 years ago
|
||
Updated•15 years ago
|
Attachment #425044 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 3•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/1be234301318
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•