We really shouldn't need to. The underlining cause is likely some Firefox bug that needs to be brought up. Unfortunately, back when I made the icon patch I tried making a minimal extension to reproduce. But couldn't seem get a reproduction. Maybe a debugging build of Firefox could help. Though I don't even know where I'd find a pre-compiled one, or where to even begin with compiling (and then somehow interpreting results).
Might be worth adding another check (or two). After sending the blob to the content-script (and it receives it) make the content-script send another trigger message. In the handler for this message do two things. Firstly, check if the blob is still valid (Fileread, etc). This is to check if the process to 'send' the blob also corrupts the background reference. Secondly, try to resave the blob or object it's attached to with minor modifications (to simulate 'ToggleScript'). See if the 'UnknownError' occurs.
This is to check if the process to 'send' the blob also corrupts the background reference.
In the "broken-blob" codebase attached at the above bugzilla issue, I added a readBlob() in the BG side, same message handler. As I load each page, it always successfully reads its own blob and logs its contents.
Secondly, try to resave the blob or object it's attached to with minor modifications
Interesting idea, feel free to give it a shot. But see my update to that bugzilla issue today, only re-launching Firefox with no additional save seems to break it?
Issues are useful for more than one thing. This is tagged in the 4.4 release, and will go out there. We've "only" got a work around in place, but that's what we can do. Tracking a separate issue (clean up the workaround, if/when the underlying issue is fixed) would be fine, but won't be part of the 4.4 release.
See #2909 . I've repeatedly tried to narrow down a reproduction case, but I can't. All I know for sure is:
So I think we need to update resources to be stored as buffers instead of raw blobs, just like we did for icons.
The text was updated successfully, but these errors were encountered: