New issue 108012 by ericbide...@chromium.org: IndexedDB should support
storing File/Blob objects
http://code.google.com/p/chromium/issues/detail?id=108012
FF has this implemented:
https://bugzilla.mozilla.org/show_bug.cgi?id=661877
I'm currently seeing Mac, 18.0.974.0 canary crash when trying to .put() a
File.
File via the FileSystem API appears to be working correctly, except that
the name property becomes all zeros (!).
ericbidelman@ - I don't suppose you have a repro handy?
Sure. Attached has code that's compatible with FF (though not currently
working in their nightlies),
but repos fine in WebKit. It crashes Chrome for me.
Again: Mac OSX, 10.6.8 17.0.963.12 dev
Attachments:
indexeddb_save_file.html 5.6 KB
The important bit in the repro is that the object store has a keyPath and
that the data being put contains a File. This triggers the crash regardless
of whether autoIncrement is set or whether the path resolves to anything in
the data being put.
With this patch in place:
diff --git a/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
b/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
index 0b757ca..2e68bab 100644
--- a/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
+++ b/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
@@ -222,8 +222,9 @@ v8::Local<v8::Object>
V8DOMWrapper::instantiateV8Object(V8Proxy* proxy, WrapperT
proxy = V8Proxy::retrieve(frame);
}
#if ENABLE(WORKERS)
- else
+ else if (isWrapperOfType(globalPrototype,
&V8WorkerContext::info)) {
workerContext =
V8WorkerContext::toNative(lookupDOMWrapper(V8WorkerContext::GetTemplate(),
context->Global()));
+ }
#endif
}
... Chromium fails a DCHECK in webkit/blob/blob_storage_controller.cc:137,
in BlobStorageController::CloneBlob:
BlobData* blob_data = GetBlobDataFromUrl(src_url);
DCHECK(blob_data);
[27193:27209:76966562271:FATAL:blob_storage_controller.cc(137)] Check
failed: blob_data.
Backtrace:
base::debug::StackTrace::StackTrace() [0x7f9c6be87f7e]
logging::LogMessage::~LogMessage() [0x7f9c6beb2f20]
webkit_blob::BlobStorageController::CloneBlob() [0x7f9c6dc93f09]
BlobMessageFilter::OnCloneBlob() [0x7f9c6c956d80]
DispatchToMethod<>() [0x7f9c6c957a6b]
BlobHostMsg_CloneBlob::Dispatch<>() [0x7f9c6c9575d9]
BlobMessageFilter::OnMessageReceived() [0x7f9c6c9566ea]
content::BrowserMessageFilter::DispatchMessage() [0x7f9c6c701d17]
content::BrowserMessageFilter::OnMessageReceived() [0x7f9c6c701bb4]
IPC::ChannelProxy::Context::TryFilters() [0x7f9c6bb8f8ff]
IPC::ChannelProxy::Context::OnMessageReceived() [0x7f9c6bb8f983]
IPC::Channel::ChannelImpl::ProcessIncomingMessages() [0x7f9c6bb8a2bd]
IPC::Channel::ChannelImpl::OnFileCanReadWithoutBlocking() [0x7f9c6bb8c185]
base::MessagePumpLibevent::FileDescriptorWatcher::OnFileCanReadWithoutBlocking()
[0x7f9c6be74268]
base::MessagePumpLibevent::OnLibeventNotification() [0x7f9c6be7623b]
event_process_active [0x7f9c6e4e1779]
event_base_loop [0x7f9c6e4e1aa8]
base::MessagePumpLibevent::Run() [0x7f9c6be75a19]
MessageLoop::RunInternal() [0x7f9c6beb7ba3]
MessageLoop::RunHandler() [0x7f9c6beb7a56]
MessageLoop::Run() [0x7f9c6beb738b]
base::Thread::Run() [0x7f9c6bf0424e]
base::Thread::ThreadMain() [0x7f9c6bf043ce]
base::(anonymous namespace)::ThreadFunc() [0x7f9c6befa9cf]
start_thread [0x7f9c6578d9ca]
0x7f9c6296670d
Trace/breakpoint trap
Comment #20 on issue 108012 by jsb...@chromium.org: IndexedDB should
support storing File/Blob objects
http://code.google.com/p/chromium/issues/detail?id=108012
(No comment was entered for this change.)