DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5b81998bb7ab)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
# HG changeset patch
# Parent 11023ab3d23865b71678e9a4b22a45646ec0c0f0
diff --git a/gfx/angle/src/compiler/preprocessor/atom.c b/gfx/angle/src/compiler/preprocessor/atom.c
--- a/gfx/angle/src/compiler/preprocessor/atom.c
+++ b/gfx/angle/src/compiler/preprocessor/atom.c
@@ -327,22 +327,17 @@ static int GrowAtomTable(AtomTable *atab
             newmap = realloc(atable->amap, sizeof(int)*size);
             newrev = realloc(atable->arev, sizeof(int)*size);
         } else {
             newmap = malloc(sizeof(int)*size);
             newrev = malloc(sizeof(int)*size);
             atable->size = 0;
         }
         if (!newmap || !newrev) {
-            /* failed to grow -- error */
-            if (newmap)
-                atable->amap = newmap;
-            if (newrev)
-                atable->arev = newrev;
-            return -1;
+            abort();
         }
         memset(&newmap[atable->size], 0, (size - atable->size) * sizeof(int));
         memset(&newrev[atable->size], 0, (size - atable->size) * sizeof(int));
         atable->amap = newmap;
         atable->arev = newrev;
         atable->size = size;
     }
     return 0;