From 7073103e1aa4cefdb9f6f562f4e0c6b91c6ec954 Mon Sep 17 00:00:00 2001 From: "jrgm%netscape.com" Date: Sun, 9 Mar 2003 05:57:23 +0000 Subject: [PATCH] backout changes for bug 196461, due to startup crash on win32 git-svn-id: svn://10.0.0.236/trunk@139164 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/src/jsapi.c | 1 - mozilla/js/src/jsatom.c | 3 --- mozilla/js/src/jscntxt.h | 3 --- mozilla/js/src/jsgc.c | 5 +---- 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/mozilla/js/src/jsapi.c b/mozilla/js/src/jsapi.c index b93eced059a..0bbcb1a780b 100644 --- a/mozilla/js/src/jsapi.c +++ b/mozilla/js/src/jsapi.c @@ -1518,7 +1518,6 @@ JS_ClearNewbornRoots(JSContext *cx) for (i = 0; i < GCX_NTYPES; i++) cx->newborn[i] = NULL; - cx->lastAtom = NULL; } #include "jshash.h" /* Added by JSIFY */ diff --git a/mozilla/js/src/jsatom.c b/mozilla/js/src/jsatom.c index 8467e3d811a..0faecfc5262 100644 --- a/mozilla/js/src/jsatom.c +++ b/mozilla/js/src/jsatom.c @@ -459,7 +459,6 @@ js_AtomizeHashedKey(JSContext *cx, jsval key, JSHashNumber keyHash, uintN flags) atom = (JSAtom *)he; atom->flags |= flags; - cx->lastAtom = atom; out: JS_UNLOCK(&state->lock,cx); return atom; @@ -550,7 +549,6 @@ js_AtomizeDouble(JSContext *cx, jsdouble d, uintN flags) atom = (JSAtom *)he; atom->flags |= flags; - cx->lastAtom = atom; out: JS_UNLOCK(&state->lock,cx); return atom; @@ -613,7 +611,6 @@ js_AtomizeString(JSContext *cx, JSString *str, uintN flags) atom = (JSAtom *)he; atom->flags |= flags & (ATOM_PINNED | ATOM_INTERNED); - cx->lastAtom = atom; out: JS_UNLOCK(&state->lock,cx); return atom; diff --git a/mozilla/js/src/jscntxt.h b/mozilla/js/src/jscntxt.h index 6be3cadfc28..ea07ddd95ad 100644 --- a/mozilla/js/src/jscntxt.h +++ b/mozilla/js/src/jscntxt.h @@ -317,9 +317,6 @@ struct JSContext { /* Most recently created things by type, members of the GC's root set. */ JSGCThing *newborn[GCX_NTYPES]; - /* Atom root for the last-looked-up atom on this context. */ - JSAtom *lastAtom; - /* Regular expression class statics (XXX not shared globally). */ JSRegExpStatics regExpStatics; diff --git a/mozilla/js/src/jsgc.c b/mozilla/js/src/jsgc.c index b034c6ba093..5420f25f8bb 100644 --- a/mozilla/js/src/jsgc.c +++ b/mozilla/js/src/jsgc.c @@ -759,7 +759,7 @@ gc_dump_thing(JSGCThing *thing, uint8 flags, GCMarkNode *prev, FILE *fp) ? NULL : JSVAL_TO_PRIVATE(privateValue); const char *className = gc_object_class_name(thing); - fprintf(fp, "object %8p %s", privateThing, className); + fprintf(fp, "object %08p %s", privateThing, className); break; } case GCX_DOUBLE: @@ -989,7 +989,6 @@ js_ForceGC(JSContext *cx, uintN gcflags) for (i = 0; i < GCX_NTYPES; i++) cx->newborn[i] = NULL; - cx->lastAtom = NULL; cx->runtime->gcPoke = JS_TRUE; js_GC(cx, gcflags); JS_ArenaFinish(); @@ -1262,8 +1261,6 @@ restart: NULL); for (i = GCX_EXTERNAL_STRING; i < GCX_NTYPES; i++) GC_MARK(cx, acx->newborn[i], "newborn external string", NULL); - if (acx->lastAtom) - GC_MARK_ATOM(cx, acx->lastAtom, NULL); #if JS_HAS_EXCEPTIONS if (acx->throwing && JSVAL_IS_GCTHING(acx->exception)) GC_MARK(cx, JSVAL_TO_GCTHING(acx->exception), "exception", NULL);