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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } 436 }
437 437
438 VOID_TO_NPVARIANT(*result); 438 VOID_TO_NPVARIANT(*result);
439 return true; 439 return true;
440 } 440 }
441 return false; 441 return false;
442 } 442 }
443 443
444 static bool testGetIntIdentifier(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result) 444 static bool testGetIntIdentifier(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
445 { 445 {
446 if (argCount == 1 && NPVARIANT_IS_DOUBLE(args[0])) { 446 if (argCount != 1)
447 NPIdentifier identifier = browser->getintidentifier((int)NPVARIANT_TO_DO UBLE(args[0])); 447 return false;
448
449 NPIdentifier identifier;
450
451 if (NPVARIANT_IS_DOUBLE(args[0])) {
452 identifier = browser->getintidentifier((int)NPVARIANT_TO_DOUBLE(args[0]) );
453 INT32_TO_NPVARIANT((int32)identifier, *result);
454 return true;
455 } else if (NPVARIANT_IS_INT32(args[0])) {
456 identifier = browser->getintidentifier((int)NPVARIANT_TO_INT32(args[0])) ;
448 INT32_TO_NPVARIANT((int32)identifier, *result); 457 INT32_TO_NPVARIANT((int32)identifier, *result);
449 return true; 458 return true;
450 } 459 }
451 return false; 460 return false;
452 } 461 }
453 462
454 static bool testGetProperty(PluginObject* obj, const NPVariant* args, uint32_t a rgCount, NPVariant* result) 463 static bool testGetProperty(PluginObject* obj, const NPVariant* args, uint32_t a rgCount, NPVariant* result)
455 { 464 {
456 if (argCount == 0) 465 if (argCount == 0)
457 return false; 466 return false;
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 object->firstUrl = strdup(url); 823 object->firstUrl = strdup(url);
815 if (headers) 824 if (headers)
816 object->firstHeaders = strdup(headers); 825 object->firstHeaders = strdup(headers);
817 } else { 826 } else {
818 free(object->lastUrl); 827 free(object->lastUrl);
819 free(object->lastHeaders); 828 free(object->lastHeaders);
820 object->lastUrl = (url ? strdup(url) : NULL); 829 object->lastUrl = (url ? strdup(url) : NULL);
821 object->lastHeaders = (headers ? strdup(headers) : NULL); 830 object->lastHeaders = (headers ? strdup(headers) : NULL);
822 } 831 }
823 } 832 }
OLDNEW
« 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