Hello
james.su,
I'd like you to do a code review. Please review the following patch:
----------------------------------------------------------------------
r1274: (no author) | 2009-11-18 17:48:41 +0800
Let gtkmozembed display error messages on network errors.
----------------------------------------------------------------------
=== extensions/gtkmoz_browser_element/browser_child.cc
==================================================================
--- extensions/gtkmoz_browser_element/browser_child.cc (revision 1273)
+++ extensions/gtkmoz_browser_element/browser_child.cc (revision 1274)
@@ -63,6 +63,8 @@
#include <nsIGenericFactory.h>
#include <nsIInterfaceRequestor.h>
#include <nsIInterfaceRequestorUtils.h>
+#include <nsIPrefBranch.h>
+#include <nsIPrefService.h>
#include <nsIScriptExternalNameSet.h>
#include <nsIScriptGlobalObject.h>
#include <nsIScriptNameSpaceManager.h>
@@ -1300,6 +1302,13 @@
gtk_moz_embed_push_startup();
InitCustomComponents();
+
+ nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
+ if (prefs) {
+ // To let mozilla display appropriate error messages on network errors.
+ prefs->SetBoolPref("browser.xul.error_pages.enabled", PR_TRUE);
+ }
+
if (g_down_fd != 0) {
// Only start ping timer in actual environment to ease testing.
// Use high priority to ensure the callback is called even if the main
This is a semiautomated message from "svkmail". Complaints or suggestions?
Mail
edy...@gmail.com.