arena->last_mark->next = rv; arena->last_mark = rv;
if ( (nssArenaMark *)NULL == arena->first_mark) { arena->first_mark = rv; arena->last_mark = rv; } else { arena->last_mark->next = rv; arena->last_mark = rv; }
nssArena_Mark(  NSSArena *arena){  nssArenaMark *rv;  void *p;#ifdef NSSDEBUG  if( PR_SUCCESS != nssArena_verifyPointer(arena) ) {    return (nssArenaMark *)NULL;  }#endif /* NSSDEBUG */  PR_Lock(arena->lock);  if( (PRLock *)NULL == arena->lock ) {    /* Just got destroyed */    nss_SetError(NSS_ERROR_INVALID_ARENA);    return (nssArenaMark *)NULL;  }#ifdef ARENA_THREADMARK  if( (PRThread *)NULL == arena->marking_thread ) {    /* Unmarked.  Store our thread ID */    arena->marking_thread = PR_GetCurrentThread();    /* This call never fails. */  } else {    /* Marked.  Verify it's the current thread */    if( PR_GetCurrentThread() != arena->marking_thread ) {      PR_Unlock(arena->lock);      nss_SetError(NSS_ERROR_ARENA_MARKED_BY_ANOTHER_THREAD);      return (nssArenaMark *)NULL;    }  }#endif /* ARENA_THREADMARK */  p = PL_ARENA_MARK(&arena->pool);  /* No error possible */  /* Do this after the mark */  rv = nss_ZNEW(arena, nssArenaMark);  if( (nssArenaMark *)NULL == rv ) {    PR_Unlock(arena->lock);    nss_SetError(NSS_ERROR_NO_MEMORY);    return (nssArenaMark *)NULL;  }#ifdef ARENA_THREADMARK  arena->last_mark->next = rv;  arena->last_mark = rv;#endif /* ARENA_THREADMARK */  rv->mark = p;  rv->magic = MARK_MAGIC;#ifdef ARENA_DESTRUCTOR_LIST  rv->prev_destructor = arena->last_destructor;#endif /* ARENA_DESTRUCTOR_LIST */  PR_Unlock(arena->lock);  return rv;}