Bug 553459 postData goButtonObserver followup (Remove try/catch)
authorPhilip Chee <philip.chee@gmail.com>
Mon, 07 Mar 2011 18:47:54 +0800
changeset 7270 4087c9b318d3bbc59131af15abf9cd315be84161
parent 7269 9adffca33dd784f622f5d947e3596464b17ef4af
child 7271 5f4c7d86f2666eb0f54bfb0faa906e37687fb22b
push idunknown
push userunknown
push dateunknown
bugs553459
Bug 553459 postData goButtonObserver followup (Remove try/catch) DONTBUILD
suite/browser/navigatorDD.js
--- a/suite/browser/navigatorDD.js
+++ b/suite/browser/navigatorDD.js
@@ -172,34 +172,32 @@ var goButtonObserver = {
   onDragExit: function (aEvent, aDragSession)
     {
       aEvent.target.removeAttribute("dragover");
     },
   onDrop: function (aEvent, aXferData, aDragSession)
     {
       var xferData = aXferData.data.split("\n");
       var draggedText = xferData[0] || xferData[1];
-      try {
-        nsDragAndDrop.dragDropSecurityCheck(aEvent, aDragSession, draggedText);
+      nsDragAndDrop.dragDropSecurityCheck(aEvent, aDragSession, draggedText);
 
-        var uri;
-        try {
-          uri = makeURI(draggedText);
-        } catch (ex) { }
-        if (uri) {
-          // we have a valid url, so do a security check for javascript.
-          const nsIScriptSecMan = Components.interfaces.nsIScriptSecurityManager;
-          urlSecurityCheck(uri, content.document.nodePrincipal,
-                           nsIScriptSecMan.DISALLOW_SCRIPT_OR_DATA);
-        }
+      var uri;
+      try {
+        uri = makeURI(draggedText);
+      } catch (ex) { }
+      if (uri) {
+        // we have a valid url, so do a security check for javascript.
+        const nsIScriptSecMan = Components.interfaces.nsIScriptSecurityManager;
+        urlSecurityCheck(uri, content.document.nodePrincipal,
+                         nsIScriptSecMan.DISALLOW_SCRIPT_OR_DATA);
+      }
 
-        var postData = {};
-        var url = getShortcutOrURI(draggedText, postData);
-        loadURI(url, null, postData.value, true);
-      } catch (ex) { }
+      var postData = {};
+      var url = getShortcutOrURI(draggedText, postData);
+      loadURI(url, null, postData.value, true);
     },
   getSupportedFlavours: function ()
     {
       var flavourSet = new FlavourSet();
       flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
       flavourSet.appendFlavour("text/x-moz-url");
       flavourSet.appendFlavour("text/unicode");
       return flavourSet;