[OOPP] NPN_IntFromIdentifier returns INT_MIN always?

RESOLVED FIXED

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: benjamin, Assigned: benjamin)

Tracking

unspecified
x86
Windows 7
Points:
---

Firefox Tracking Flags

(blocking1.9.2 .4+, status1.9.2 .4-fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

8 years ago
From Ben Pryor @ Microsoft:

> We've found an issue with the latest Firefox builds and Silverlight. The 
> issue only repros when OOPP is enabled for the Silverlight plugin.
> 
> The issue concerns array-style access to a scriptable object (a 
> Silverlight object exposed to Javascript through Firefox's NPRuntime). 
> In Javascript, if I use array-style syntax against such an object, i.e.:
> 
> myobject[0]
> 
> then the following occurs:
> 
> - the browser calls our object's NPGetPropertyFunctionPtr
> 
> - we call NPN_IdentifierIsString on the NPIdentifier, and it returns false
> 
> - we call NPN_IntFromIdentifier on the NPIdentifier, and it returns 
> -2147483648 (i.e. INT_MIN for a 32-bit signed int)
> 
> NPN_IntFromIdentifier seems to return the same value regardless of the 
> Javascript syntax, i.e. myobject[0], myobject[1], etc. all give the same 
> behavior.
> 
> If OOPP is disabled for the Silverlight plugin, then 
> NPN_IntFromIdentifier returns 0, 1, etc. as expected.

Updated

8 years ago
blocking1.9.2: ? → .4+
status1.9.2: --- → wanted
(Assignee)

Comment 1

8 years ago
Created attachment 444463 [details] [diff] [review]
Fix conditional and stop using -1 sentinel incorrectly, rev. 1
Attachment #444463 - Flags: review?(bent.mozilla)
(Assignee)

Comment 2

8 years ago
Created attachment 444464 [details] [diff] [review]
Test
Attachment #444463 - Flags: review?(bent.mozilla) → review+

Comment 3

8 years ago
Comment on attachment 444463 [details] [diff] [review]
Fix conditional and stop using -1 sentinel incorrectly, rev. 1

a=LegNeato for 1.9.2.4
Attachment #444463 - Flags: approval1.9.2.4+

Comment 4

8 years ago
Can we get a trybuild we can point MS at to see if this completely fixes the issue?
(Assignee)

Comment 6

8 years ago
http://hg.mozilla.org/mozilla-central/rev/44347d8a48bc
http://hg.mozilla.org/mozilla-central/rev/4980a5f7467f

(in today's m-c nightly)
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Updated

8 years ago
Duplicate of this bug: 559760
Mochitest passes on 1.9.2 post-checkin. Is this enough to verify this issue since there is no manual STR for the bug?
(Assignee)

Comment 10

8 years ago
You should verify the dupped bug 559760 also, but the bug is fairly straightforward and the test covers it.
You need to log in before you can comment on or make changes to this bug.