[Bbs2ch-cvs 346] [328] 引数の NULL チェック

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 1月 20日 (日) 18:06:48 JST


Revision: 328
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=bbs2ch&view=rev&rev=328
Author:   flyson
Date:     2008-01-20 18:06:47 +0900 (Sun, 20 Jan 2008)

Log Message:
-----------
引数の NULL チェック

Modified Paths:
--------------
    trunk/bbs2chreader/chrome/content/bbs2chreader/components/b2rGlobalThreadUtils.js
    trunk/bbs2chreader/components/b2rGlobalService.js


-------------- next part --------------
Modified: trunk/bbs2chreader/chrome/content/bbs2chreader/components/b2rGlobalThreadUtils.js
===================================================================
--- trunk/bbs2chreader/chrome/content/bbs2chreader/components/b2rGlobalThreadUtils.js	2008-01-20 08:59:07 UTC (rev 327)
+++ trunk/bbs2chreader/chrome/content/bbs2chreader/components/b2rGlobalThreadUtils.js	2008-01-20 09:06:47 UTC (rev 328)
@@ -53,7 +53,7 @@
 
 	getBoardType: function(aThreadURL){
 		if(aThreadURL === null){
-			throw Components.results.NS_ERROR_NULL_POINTER;
+			throw Components.results.NS_ERROR_INVALID_POINTER;
 		}
 
 			// HTTP ˆÈŠO
@@ -85,7 +85,7 @@
 
 	getBoardID: function(aBoardURL){
 		if(aBoardURL === null){
-			throw Components.results.NS_ERROR_NULL_POINTER;
+			throw Components.results.NS_ERROR_INVALID_POINTER;
 		}
 
 		var boardID = "/";
@@ -107,7 +107,7 @@
 
 	getBoardURL: function(aURL){
 		if(aURL === null){
-			throw Components.results.NS_ERROR_NULL_POINTER;
+			throw Components.results.NS_ERROR_INVALID_POINTER;
 		}
 
 		var boardURLSpec = aURL.resolve("../");

Modified: trunk/bbs2chreader/components/b2rGlobalService.js
===================================================================
--- trunk/bbs2chreader/components/b2rGlobalService.js	2008-01-20 08:59:07 UTC (rev 327)
+++ trunk/bbs2chreader/components/b2rGlobalService.js	2008-01-20 09:06:47 UTC (rev 328)
@@ -143,6 +143,10 @@
 
 	getHttpChannel: function(aURL){
 		if(!this._initialized) throw Components.results.NS_ERROR_NOT_INITIALIZED;
+		if(aURL === null){
+			throw Components.results.NS_ERROR_INVALID_POINTER;
+		}
+
 		var httpChannel;
 		var pref = XPC.getService("@mozilla.org/preferences-service;1", "nsIPrefBranch");
 		var ioService = XPC.getService("@mozilla.org/network/io-service;1", "nsIIOService");


bbs2ch-cvs メーリングリストの案内
Back to archive index