зеркало из https://github.com/mozilla/gecko-dev.git
checks for null strings. test programs only.
This commit is contained in:
Родитель
152f6f29e4
Коммит
950775e1ac
|
@ -73,6 +73,7 @@ void testAttributes(nsIHTMLContent* content) {
|
|||
|
||||
nsISupportsArray* allNames;
|
||||
NS_NewISupportsArray(&allNames);
|
||||
if (nsnull == allNames) return;
|
||||
|
||||
PRInt32 na;
|
||||
content->GetAttributeCount(na);
|
||||
|
@ -236,8 +237,13 @@ int main(int argc, char** argv)
|
|||
|
||||
// Create test document.
|
||||
MyDocument *myDoc = new MyDocument();
|
||||
if (myDoc) {
|
||||
testStrings(myDoc);
|
||||
} else {
|
||||
printf("Out of memory trying to create document\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
testStrings(myDoc);
|
||||
|
||||
// Create a new text content object.
|
||||
nsIContent *text;
|
||||
|
|
|
@ -75,7 +75,13 @@ int main(int argc, char** argv)
|
|||
|
||||
// Create scanner and set it up to process the input file
|
||||
nsCSSScanner* css = new nsCSSScanner();
|
||||
if (nsnull == css) {
|
||||
printf("Out of memory allocating nsCSSScanner\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
css->Init(uin);
|
||||
|
||||
|
||||
// Scan the file and dump out the tokens
|
||||
nsCSSToken tok;
|
||||
|
|
Загрузка…
Ссылка в новой задаче