diff dwt/internal/mozilla/nsEmbedString.d @ 348:9a4d7706df52

Test Update to fix linux XPCOM interface issues
author John Reimer <terminal.node@gmail.com>
date Fri, 31 Oct 2008 21:46:44 -0700
parents 3f4a5c7d138f
children
line wrap: on
line diff
--- a/dwt/internal/mozilla/nsEmbedString.d	Wed Oct 29 20:12:27 2008 -0700
+++ b/dwt/internal/mozilla/nsEmbedString.d	Fri Oct 31 21:46:44 2008 -0700
@@ -4,6 +4,7 @@
 
 import dwt.internal.mozilla.Common;
 import dwt.internal.mozilla.nsStringAPI;
+import XPCOM = dwt.internal.mozilla.XPCOM;
 
 scope class nsEmbedString
 {    
@@ -11,7 +12,7 @@
 	{
 		nsresult result;
 		result = NS_StringContainerInit2(&str, s.ptr, s.length, 0);
-		if (result != 0) // TODO: convert to XPCOM fail macro
+		if (XPCOM.NS_FAILED(result)) 
 			throw new Exception("Init string container fail");
 	}
 
@@ -19,7 +20,7 @@
 	{
 		nsresult result;
 		result = NS_StringContainerInit(&str);
-		if (result != 0) // TODO: convert to XPCOM fail macro
+		if (XPCOM.NS_FAILED(result)) 
 			throw new Exception("Init string container fail");
 	}
 
@@ -55,7 +56,7 @@
 	{
 		nsresult result;
 		result = NS_CStringContainerInit2(&str, s.ptr, s.length, 0);
-		if (result != 0) // TODO: convert to XPCOM fail macro
+		if (XPCOM.NS_FAILED(result)) 
 			throw new Exception("Init string container fail");
 	}
 
@@ -63,7 +64,7 @@
 	{
 		nsresult result;
 		result = NS_CStringContainerInit(&str);
-		if (result != 0) // TODO: convert to XPCOM fail macro
+		if (XPCOM.NS_FAILED(result)) 
 			throw new Exception("Init string container fail");
 	}