r7450 - mugshot-client/trunk/common/firefox/src
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7450 - mugshot-client/trunk/common/firefox/src
- Date: Thu, 24 Apr 2008 16:25:00 -0500 (CDT)
Author: otaylor
Date: 2008-04-24 16:25:00 -0500 (Thu, 24 Apr 2008)
New Revision: 7450
Modified:
mugshot-client/trunk/common/firefox/src/hippoControl.cpp
Log:
Another try at https://bugzilla.redhat.com/show_bug.cgi?id=441643;
instead of using the internal Mozilla API, define a dummy structure
the same size as the internal nsString.
Modified: mugshot-client/trunk/common/firefox/src/hippoControl.cpp
===================================================================
--- mugshot-client/trunk/common/firefox/src/hippoControl.cpp 2008-04-24 20:03:37 UTC (rev 7449)
+++ mugshot-client/trunk/common/firefox/src/hippoControl.cpp 2008-04-24 21:25:00 UTC (rev 7450)
@@ -20,29 +20,6 @@
#endif
#include "nspr.h"
-
-#ifdef HAVE_XULRUNNER
-/* For our usage of nsIDocument, we hit a problem where the
- * size of nsString and nsString_external are different on
- * some architectures. Since nsIDocument has a nsString
- * member, accessing subsequent members then causes a crash
- * because of their different location within the structure.
- * As a workaround, we define MOZILLA_INTERNAL_API to use
- * the internal nsString; this may cause problems with future
- * versions of Gecko if the internal strings are made more
- * strictly private.
- *
- * http://bugzilla.redhat.com/show_bug.cgi?id=441643
- * http://bugzilla.mozilla.org/show_bug.cgi?id=430581
- */
-#define MOZILLA_INTERNAL_API 1
-#include <nsString.h>
-#include <nsEscape.h>
-#else
-#include <nsStringAPI.h>
-#endif
-
-#include <nsString.h>
#include "nsMemory.h"
#include "nsNetCID.h"
#include "nsISupportsUtils.h"
@@ -51,6 +28,7 @@
#include "nsIURI.h"
#include "nsIScriptSecurityManager.h"
#include "nsServiceManagerUtils.h"
+#include "nsStringAPI.h"
#include "hippoControl.h"
#ifdef HAVE_XULRUNNER
#include "nsIClassInfoImpl.h"
@@ -66,7 +44,28 @@
#include "nsIWidget.h"
// For Firefox 2, this is "internal API".
#ifdef HAVE_XULRUNNER
+// For our usage of nsIDocument, we hit a problem where the
+// size of nsString and nsString_external are different on
+// some architectures. Since nsIDocument has a nsString
+// member, accessing subsequent members then causes a crash
+// because of their different location within the structure.
+//
+// http://bugzilla.redhat.com/show_bug.cgi?id=441643
+// http://bugzilla.mozilla.org/show_bug.cgi?id=430581
+
+struct hippoDummyString {
+ // These are the fields in the internal nsString in Gecko-1.9pre
+ PRUnichar *mData;
+ PRUint32 mLength;
+ PRUint32 mFlags;
+};
+
+#undef nsString
+#define nsString hippoDummyString
#include "nsIDocument.h"
+#undef nsString
+#define nsString_external
+
#include "nsPIDOMWindow.h"
#endif
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]