WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 29068
NPAPI Plugin NPP_AsFile not working on Qt Webkit
https://bugs.webkit.org/show_bug.cgi?id=29068
Summary
NPAPI Plugin NPP_AsFile not working on Qt Webkit
Rohini Ananth
Reported
2009-09-08 23:01:48 PDT
For NPAPI Plugins having stream transfer mode other than NP_NORMAL, a QTemporaryFile through openTemporaryFile() call in PluginStream::startstream gets created and in PluginStream::destroystream the file handle is closed before passing the file path in NPP_AsFile to plugin. By default, the property ‘autoremove’ of QTemporaryFile is true and such a setting deletes the file for closeFileHandle() itself, hence plugin does not see any created temp file.
Attachments
Patch which solves the deletion of created temp file before passing to plugin in NPP_AsFile
(730 bytes, patch)
2009-09-08 23:09 PDT
,
Rohini Ananth
hausmann
: review-
Details
Formatted Diff
Diff
Final Patch with review comments incorporated
(1.43 KB, patch)
2009-09-09 02:24 PDT
,
Rohini Ananth
hausmann
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Rohini Ananth
Comment 1
2009-09-08 23:09:41 PDT
Created
attachment 39247
[details]
Patch which solves the deletion of created temp file before passing to plugin in NPP_AsFile In the patch, in openTemporaryFile() method implemented for platform Qt in FileSystemQt.cpp, the autoremove property has been set to false.Hence closeFileHandle() just closes and does not delete the file before passing it to plugin. As last step of PluginStream::destroystream, anyways the deletion of this temp file has been taken care.
Simon Hausmann
Comment 2
2009-09-09 01:40:19 PDT
Comment on
attachment 39247
[details]
Patch which solves the deletion of created temp file before passing to plugin in NPP_AsFile Your patch looks good in principle, thanks for tracking down this bug!
> + QTemporaryFile *tempFile = new QTemporaryFile(QLatin1String(prefix)); > + tempFile->setAutoRemove(false); > + QFile *temp = tempFile;
Please fix the coding style for the newly added lines, the position of the * should be next to the type, not the variable. Also please include a ChangeLog entry explaining your fix, using the same (very good btw) explanation you mentioned in this bugzilla entry. r- because of that, but otherwise ok :-)
Rohini Ananth
Comment 3
2009-09-09 02:24:14 PDT
Created
attachment 39255
[details]
Final Patch with review comments incorporated Thanks for the review Simon !
Simon Hausmann
Comment 4
2009-09-09 02:53:02 PDT
Comment on
attachment 39255
[details]
Final Patch with review comments incorporated r=me. You don't have to fill out the "Reviewed by" in the ChangeLog, it's okay to leave it with the "NOBODY (OOPS)" field. It will be filled out when landing.
Simon Hausmann
Comment 5
2009-09-09 02:53:30 PDT
Landed in
r48204
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug