Bug 375457 - "toDataURL has incorrect type-checking logic" [p=joe@drew.ca (Joe Drew [JOEDREW!]) r+a1.9=vlad]

git-svn-id: svn://10.0.0.236/trunk@247944 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com 2008-03-16 21:02:05 +00:00
parent 7edfa3f57d
commit a912798d17

View File

@ -330,7 +330,7 @@ nsHTMLCanvasElement::ToDataURL(nsAString& aDataURL)
// 2-arg case; trusted only (checked above), convert to mime type with params
if (argc == 2) {
if (!JSVAL_IS_STRING(argv[0]) && !JSVAL_IS_STRING(argv[1]))
if (!JSVAL_IS_STRING(argv[0]) || !JSVAL_IS_STRING(argv[1]))
return NS_ERROR_DOM_SYNTAX_ERR;
JSString *type, *params;