                  return NS_OK;
              }
          }
+ 
+diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
+--- a/docshell/base/nsDocShell.cpp
++++ b/docshell/base/nsDocShell.cpp
+@@ -2006,16 +2006,17 @@ nsDocShell::SetCurrentURI(nsIURI* aURI, 
+     nsAutoCString spec;
+     if (aURI) {
+       aURI->GetSpec(spec);
+     }
+     PR_LogPrint("DOCSHELL %p SetCurrentURI %s\n", this, spec.get());
+   }
+ #endif
+ 
++
+   // We don't want to send a location change when we're displaying an error
+   // page, and we don't want to change our idea of "current URI" either
+   if (mLoadType == LOAD_ERROR_PAGE) {
+     return false;
+   }
+ 
+   mCurrentURI = NS_TryToMakeImmutable(aURI);
  
 diff --git a/dom/base/nsCopySupport.cpp b/dom/base/nsCopySupport.cpp
 --- a/dom/base/nsCopySupport.cpp

diff --git a/caps/nsScriptSecurityManager.cpp b/caps/nsScriptSecurityManager.cpp
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp

+  
+    NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
+}
diff --git a/widget/gtk/nsScreenManagerGtk.cpp b/widget/gtk/nsScreenManagerGtk.cpp
--- a/widget/gtk/nsScreenManagerGtk.cpp
+++ b/widget/gtk/nsScreenManagerGtk.cpp
@@ -362,8 +362,20 @@ nsScreenManagerGtk :: ScreenForNativeWid
     gdk_window_get_origin(GDK_WINDOW(aWidget), &x, &y);
     rv = ScreenForRectPix(x, y, width, height, outScreen);
   } else {
     rv = GetPrimaryScreen(outScreen);
   }
 
   return rv;
 }
+
+NS_IMETHODIMP
+nsScreenManagerGtk::ScreenForIndex(uint32_t aIndex, nsIScreen**outScreen)
+{
+    uint32_t numberOfScreens;
+    GetNumberOfScreens(&numberOfScreens);
+    if (aIndex >= numberOfScreens)
+        return NS_ERROR_FAILURE;
+
+    NS_IF_ADDREF(*outScreen = mCachedScreenArray[aIndex]);
+    return NS_OK;
+}
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
