WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
16922
_NPN_GetIntIdentifier does not work for values 0 or -1 due to using HashMap
https://bugs.webkit.org/show_bug.cgi?id=16922
Summary
_NPN_GetIntIdentifier does not work for values 0 or -1 due to using HashMap
John Ripley
Reported
2008-01-18 04:14:28 PST
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'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.
Attachments
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2008-01-18 04:37:06 PST
Which revision are you seeing this problem in? The problem you describe sounds like one which was fixed with <
http://trac.webkit.org/projects/webkit/changeset/28366
>.
John Ripley
Comment 2
2008-01-18 05:59:53 PST
Sorry - somehow I missed that. The tree I'm working off is mostly 523.x and doesn't have this fix. The trunk version of npruntime.cpp can be taken in isolation, so I'll just grab that.
Mark Rowe (bdash)
Comment 3
2008-01-18 06:14:11 PST
Closing as WFM as this is fixed in HEAD.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug