]>
Commit | Line | Data |
---|---|---|
e745a910 AM |
1 | # --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
2 | # | |
3 | # This copyright note is auto-generated by ./scripts/Create-CopyPatch. | |
4 | # Please add additional copyright information _after_ the line containing | |
5 | # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by | |
6 | # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! | |
7 | # | |
8 | # ROCK Linux: rock-src/package/x11/mozilla/hotfix-binutils-gcc.patch | |
9 | # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf | |
10 | # | |
11 | # This patch file is dual-licensed. It is available under the license the | |
12 | # patched project is licensed under, as long as it is an OpenSource license | |
13 | # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms | |
14 | # of the GNU General Public License as published by the Free Software | |
15 | # Foundation; either version 2 of the License, or (at your option) any later | |
16 | # version. | |
17 | # | |
18 | # --- ROCK-COPYRIGHT-NOTE-END --- | |
19 | ||
20 | Hotfix needed for new binutils (bug is in gcc) | |
21 | (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625) | |
22 | ||
23 | --- ./content/html/style/src/nsROCSSPrimitiveValue.h.orig 2004-08-13 11:50:44.000000000 +0200 | |
24 | +++ ./content/html/style/src/nsROCSSPrimitiveValue.h 2004-08-13 11:57:20.000000000 +0200 | |
25 | @@ -191,27 +191,37 @@ | |
26 | ||
27 | void Reset(void) | |
28 | { | |
29 | - switch (mType) { | |
30 | - case CSS_IDENT: | |
31 | + // --- see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625 --- | |
32 | + // | |
33 | + // we can't make a switch statement here because the compiler will create a | |
34 | + // jump-table in .ro_data for it and cause a link error such as: | |
35 | + // | |
36 | + // # .L1035' referenced in section `.rodata' of | |
37 | + // # ../../dist/lib/libgkconhtmlstyle_s.a(nsROCSSPrimitiveValue.o): defined in | |
38 | + // # discarded section `.gnu.linkonce.t._ZN21nsROCSSPrimitiveValue5ResetEv' of | |
39 | + // # ../../dist/lib/libgkconhtmlstyle_s.a(nsROCSSPrimitiveValue.o) | |
40 | + // | |
41 | + // - clifford (2004-08-13) | |
42 | + // | |
43 | + if (mType == CSS_IDENT) { | |
44 | NS_ASSERTION(mValue.mAtom, "Null atom should never happen"); | |
45 | NS_RELEASE(mValue.mAtom); | |
46 | - break; | |
47 | - case CSS_STRING: | |
48 | + } | |
49 | + if (mType == CSS_STRING) { | |
50 | NS_ASSERTION(mValue.mString, "Null string should never happen"); | |
51 | nsMemory::Free(mValue.mString); | |
52 | mValue.mString = nsnull; | |
53 | - break; | |
54 | - case CSS_URI: | |
55 | + } | |
56 | + if (mType == CSS_URI) { | |
57 | NS_IF_RELEASE(mValue.mURI); | |
58 | - break; | |
59 | - case CSS_RECT: | |
60 | + } | |
61 | + if (mType == CSS_RECT) { | |
62 | NS_ASSERTION(mValue.mRect, "Null Rect should never happen"); | |
63 | NS_RELEASE(mValue.mRect); | |
64 | - break; | |
65 | - case CSS_RGBCOLOR: | |
66 | + } | |
67 | + if (mType == CSS_RGBCOLOR) { | |
68 | NS_ASSERTION(mValue.mColor, "Null RGBColor should never happen"); | |
69 | NS_RELEASE(mValue.mColor); | |
70 | - break; | |
71 | } | |
72 | } | |
73 |