Windows: Fix crashes when dragging an image with OSR enabled (issue #2525)
This commit is contained in:
parent
c8ac6c879d
commit
924c2e339e
|
@ -96,9 +96,6 @@ CefString CefDragDataImpl::GetFragmentBaseURL() {
|
||||||
|
|
||||||
CefString CefDragDataImpl::GetFileName() {
|
CefString CefDragDataImpl::GetFileName() {
|
||||||
base::AutoLock lock_scope(lock_);
|
base::AutoLock lock_scope(lock_);
|
||||||
if (data_.file_contents_content_disposition.empty())
|
|
||||||
return CefString();
|
|
||||||
|
|
||||||
base::Optional<base::FilePath> filename =
|
base::Optional<base::FilePath> filename =
|
||||||
data_.GetSafeFilenameForImageFileContents();
|
data_.GetSafeFilenameForImageFileContents();
|
||||||
return filename ? CefString(filename->value()) : CefString();
|
return filename ? CefString(filename->value()) : CefString();
|
||||||
|
|
|
@ -77,7 +77,7 @@ int BytesWriteHandler::Flush() {
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t BytesWriteHandler::Grow(size_t size) {
|
size_t BytesWriteHandler::Grow(size_t size) {
|
||||||
base::AutoLock lock_scope(lock_);
|
lock_.AssertAcquired();
|
||||||
size_t rv;
|
size_t rv;
|
||||||
size_t s = (size > grow_ ? size : grow_);
|
size_t s = (size > grow_ ? size : grow_);
|
||||||
void* tmp = realloc(data_, datasize_ + s);
|
void* tmp = realloc(data_, datasize_ + s);
|
||||||
|
|
Loading…
Reference in New Issue