<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16922</bug_id>
          
          <creation_ts>2008-01-18 04:14:28 -0800</creation_ts>
          <short_desc>_NPN_GetIntIdentifier does not work for values 0 or -1 due to using HashMap</short_desc>
          <delta_ts>2008-01-18 06:14:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Plug-ins</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="John Ripley">john.ripley</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67589</commentid>
    <comment_count>0</comment_count>
    <who name="John Ripley">john.ripley</who>
    <bug_when>2008-01-18 04:14:28 -0800</bug_when>
    <thetext>The implementation of HashMap for integer keys uses values 0 and -1 as special empty and deleted bins. However, a plug-in can call NPN_GetIntIdentifier for integers 0 or -1.

I&apos;m currently working around this by remapping the incoming int32 space to uint64 with bit 32 set, which messily avoids 0 or -1.

This causes any plug-in which tries to get an NPIdentifier from Javascript to fail an assertion check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67592</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-18 04:37:06 -0800</bug_when>
    <thetext>Which revision are you seeing this problem in?  The problem you describe sounds like one which was fixed with &lt;http://trac.webkit.org/projects/webkit/changeset/28366&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67595</commentid>
    <comment_count>2</comment_count>
    <who name="John Ripley">john.ripley</who>
    <bug_when>2008-01-18 05:59:53 -0800</bug_when>
    <thetext>Sorry - somehow I missed that. The tree I&apos;m working off is mostly 523.x and doesn&apos;t have this fix. The trunk version of npruntime.cpp can be taken in isolation, so I&apos;ll just grab that.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67598</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-18 06:14:11 -0800</bug_when>
    <thetext>Closing as WFM as this is fixed in HEAD.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>