static void jsSerialPortFinalize(JSContext *cx, JSObject *obj) { jsPort_t *port = (jsPort_t *)JS_GetInstancePrivate( cx, obj, &jsSerialPortClass_, NULL ); if( port ) { jsval args[1] = { JSVAL_VOID }; jsval rval ; jsClose( cx, obj, 0, args, &rval ); } // have button data }
bool File::Close() { bool Success=true; if (hFile!=FILE_BAD_HANDLE) { if (!SkipClose) { // Success=fclose(hFile)!=EOF; jsClose(hFile); Success = true; } hFile=FILE_BAD_HANDLE; } HandleType=FILE_HANDLENORMAL; if (!Success && AllowExceptions) ErrHandler.CloseError(FileName); return Success; }