Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: webkit/tools/npapi_layout_test_plugin/PluginObject.cpp

Issue 11574: Fix the getintidentifier-special-values.html plugin layout test, which broke... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/npapi_layout_test_plugin/PluginObject.cpp
===================================================================
--- webkit/tools/npapi_layout_test_plugin/PluginObject.cpp (revision 5826)
+++ webkit/tools/npapi_layout_test_plugin/PluginObject.cpp (working copy)
@@ -443,10 +443,19 @@
static bool testGetIntIdentifier(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
{
- if (argCount == 1 && NPVARIANT_IS_DOUBLE(args[0])) {
- NPIdentifier identifier = browser->getintidentifier((int)NPVARIANT_TO_DOUBLE(args[0]));
+ if (argCount != 1)
+ return false;
+
+ NPIdentifier identifier;
+
+ if (NPVARIANT_IS_DOUBLE(args[0])) {
+ identifier = browser->getintidentifier((int)NPVARIANT_TO_DOUBLE(args[0]));
INT32_TO_NPVARIANT((int32)identifier, *result);
return true;
+ } else if (NPVARIANT_IS_INT32(args[0])) {
+ identifier = browser->getintidentifier((int)NPVARIANT_TO_INT32(args[0]));
+ INT32_TO_NPVARIANT((int32)identifier, *result);
+ return true;
}
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698