if((p=js_ValueToStringBytes(cx, argv[0], NULL))==NULL) To: JSVALUE_TO_STRING(cx, argv[0], p) if(p===NULL)