mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.8 KiB

  1. Hotfix needed for new binutils (bug is in gcc)
  2. (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625)
  3. --- ./content/html/style/src/nsROCSSPrimitiveValue.h.orig 2004-08-13 11:50:44.000000000 +0200
  4. +++ ./content/html/style/src/nsROCSSPrimitiveValue.h 2004-08-13 11:57:20.000000000 +0200
  5. @@ -191,27 +191,37 @@
  6. void Reset(void)
  7. {
  8. - switch (mType) {
  9. - case CSS_IDENT:
  10. + // --- see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625 ---
  11. + //
  12. + // we can't make a switch statement here because the compiler will create a
  13. + // jump-table in .ro_data for it and cause a link error such as:
  14. + //
  15. + // # .L1035' referenced in section `.rodata' of
  16. + // # ../../dist/lib/libgkconhtmlstyle_s.a(nsROCSSPrimitiveValue.o): defined in
  17. + // # discarded section `.gnu.linkonce.t._ZN21nsROCSSPrimitiveValue5ResetEv' of
  18. + // # ../../dist/lib/libgkconhtmlstyle_s.a(nsROCSSPrimitiveValue.o)
  19. + //
  20. + // - clifford (2004-08-13)
  21. + //
  22. + if (mType == CSS_IDENT) {
  23. NS_ASSERTION(mValue.mAtom, "Null atom should never happen");
  24. NS_RELEASE(mValue.mAtom);
  25. - break;
  26. - case CSS_STRING:
  27. + }
  28. + if (mType == CSS_STRING) {
  29. NS_ASSERTION(mValue.mString, "Null string should never happen");
  30. nsMemory::Free(mValue.mString);
  31. mValue.mString = nsnull;
  32. - break;
  33. - case CSS_URI:
  34. + }
  35. + if (mType == CSS_URI) {
  36. NS_IF_RELEASE(mValue.mURI);
  37. - break;
  38. - case CSS_RECT:
  39. + }
  40. + if (mType == CSS_RECT) {
  41. NS_ASSERTION(mValue.mRect, "Null Rect should never happen");
  42. NS_RELEASE(mValue.mRect);
  43. - break;
  44. - case CSS_RGBCOLOR:
  45. + }
  46. + if (mType == CSS_RGBCOLOR) {
  47. NS_ASSERTION(mValue.mColor, "Null RGBColor should never happen");
  48. NS_RELEASE(mValue.mColor);
  49. - break;
  50. }
  51. }