Open
Bug 1264371
Opened 8 years ago
Updated 2 years ago
FileReader should throw an exception if the underlying file changes
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
NEW
People
(Reporter: baku, Assigned: baku)
References
(Depends on 3 open bugs, Blocks 1 open bug)
Details
(Whiteboard: btpp-fixlater)
Attachments
(1 file)
40.32 KB,
patch
|
Details | Diff | Splinter Review |
We do something but it's only based on the changing of the size. We should use File::LastModified and have a version (not exposed) of this method that returns always the up-to-date value.
Updated•8 years ago
|
Whiteboard: btpp-fixlater
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → amarchesini
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8741811 -
Flags: review?(khuey)
Comment on attachment 8741811 [details] [diff] [review] aaa.patch Review of attachment 8741811 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/File.cpp @@ +714,5 @@ > > + if (WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate()) { > + if (workerPrivate->UsesSystemPrincipal()) { > + GetMozFullPathInternal(aFileName, aRv); > + } if (!UsesSystemPrincipal()) return; And then only one call to GetMozFullPathInternal. What's the logic behind this anyways? ::: dom/base/FileWatcher.cpp @@ +27,5 @@ > + nsCOMPtr<nsIRunnable> runnable = > + NS_NewRunnableMethod(this, &FileWatcherCallback::InitializeInternal); > + if (NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)))) { > + return false; > + } Just MOZ_ALWAYS_SUCCEEDS this. NS_DispatchToMainThread can't really fail. ::: dom/ipc/DOMTypes.ipdlh @@ +74,5 @@ > uint64_t length; > int64_t modDate; > > + // The full path of this file, if it points to a real file. > + nsString filePath; Does this only ever go from the chrome process to the content process? Because we can't trust what the content process gives us, right? (It could give us /etc/passwd/ or something if it's been compromised).
Attachment #8741811 -
Flags: review?(khuey)
Updated•6 years ago
|
Priority: -- → P2
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•