[Webkit-unassigned] [Bug 18333] New: NPAPI: No way of telling the difference between 'ints' and 'doubles'.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 6 12:09:35 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=18333

           Summary: NPAPI: No way of telling the difference between 'ints'
                    and 'doubles'.
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Plug-ins
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: playmobil at google.com


Javascript technically only has a double datatype, however there is utility in
telling the difference between the following two calls from JS into an NPAPI
plugin:

plugin.method(42);
plugin.method(42.0);

In Mozilla, the former yields a variant for which NPVARIANT_IS_INT32() returns
true, and for the latter NPVARIANT_IS_DOUBLE() returns true.

In WebKit there is no way to tell the difference (all numeric variants are
reported as doubles).

A sample use case is an NPAPI plugin which needs to stringify numeric values,
in this case there is no way of knowing whether a valid string representation
would be '42' or '42.0'.

This bug affects Google Gears.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list