Closed Bug 479979 Opened 16 years ago Closed 16 years ago

NPN_SetValue returns NPERR_NO_ERROR for unsupported variables

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kletterhelmut+bugzillamozilla, Assigned: jaas)

Details

(Keywords: fixed1.9.1)

Attachments

(2 files)

User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2009022317 Firefox/3.0.1

Calls to NPN_SetValue with unsupported variables like NPPVpluginWindowSize (BTW, why is NPPVpluginWindowSize not supported? :-() return NPERR_NO_ERROR whereas I would expect them to return an error code. With the current implementation it is not possible to distinguish between a set operation succeeding or not being supported.

Reproducible: Always

Actual Results:  
Returns NPERR_NO_ERROR.

Expected Results:  
Return an error code.

See ns4xPlugin.cpp, function "NPError NP_CALLBACK _setvalue(NPP npp, NPPVariable variable, void *result)" -> switch -> default -> "return NPERR_NO_ERROR;".
Component: General → Plug-ins
Product: Firefox → Core
QA Contact: general → plugins
Assignee: nobody → joshmoz
Attached patch fix v1.0 (deleted) — Splinter Review
Attachment #367683 - Flags: superreview?(jst)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Nice catch, for the record WebKit returns a generic error for unsupported variables.
OS: Linux → All
Hardware: x86 → All
Attachment #367683 - Flags: superreview?(jst)
Attachment #367683 - Flags: superreview+
Attachment #367683 - Flags: review+
pushed to trunk

http://hg.mozilla.org/mozilla-central/rev/a95010e34e4a
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment on attachment 367683 [details] [diff] [review]
fix v1.0

We should include this patch on the 1.9.1 branch, simple NPAPI compat fix.
Attachment #367683 - Flags: approval1.9.1?
Comment on attachment 367683 [details] [diff] [review]
fix v1.0

a191=beltzner
Attachment #367683 - Flags: approval1.9.1? → approval1.9.1+
Could you also add a test before landing  now that we have a test framework for plugins?
Attached patch test v1.0 (deleted) — Splinter Review
Attachment #371670 - Flags: review?(roc)
test pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/9354d5829b88
fix pushed to mozilla-1.9.1

http://hg.mozilla.org/releases/mozilla-1.9.1/rev/bb25cb889bcb
Keywords: fixed1.9.1
Did you land the test on 1.9.1 as well?
(In reply to comment #10)
> Did you land the test on 1.9.1 as well?

No.
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: