Hejhal uses that $K\in L^2(F\times F)$, which follows from the continuity of $K$ and the compactness of $F$. The latter assumption appears on the first page of Hejhal's book: "Let $F$ denote a compact Riemann surface of genus $g\geq 2$." Iwaniec deals with the general case. So both Hejhal and Iwaniec are right, but Iwaniec is more general.