Frage

I have a plug-in that stream some data and render it. But after updating to Firefox 20, the plug-in reported that it cannot find the file. After investigating the issue, I found that NPP_StreamAsFile return a different path between Firefox 19 & 20.

Windows 7 OS NPP_StreamAsFile - provides local path of file for stream. Firefox 19: NPP_StreamAsFile return "C:\Documents and Settings\Administrator\Local Settings\Application Data\Mozilla\Firefox\Profiles\jpgiohcq.default\Cache\1\78\87C58d01" Our plug-in retrieve this path and process the data

Firefox 20: NPP_StreamAsFile return "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\plugtmp-2\plugin-svrel.zhp" The file is remove after NPP_DestroyStream is called. In which case, our plug-in cannot find the file.

However, when I run Process Monitor when using Firefox 20. It appears the file get copy to cache folder before it's destroyed.

I've posted my issue on mozilla forum. They said they changed their in-cache implementation, and it's our responsible to manage the data after it's downloaded.

My question is should our plug-in make a copy of the data before NPP_DestroyStream destroy it? If so, should the data be saved at %APPDATA% application folder? I just want to make sure I'm following the correct guidelines for gecko plug-in development. I wasn't successfully finding any details about this process else where.

War es hilfreich?

Lösung

My question is should our plug-in make a copy of the data before NPP_DestroyStream destroy it?

If you want it to stay around afterwards, then yes, you have to make a copy (see bug 879503).

A plugin that streams data sounds like you want to copy to a temp directory (e.g. GetTempPath()).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top