| Index: webkit/tools/test_shell/test_shell_webblobregistry_impl.cc
|
| ===================================================================
|
| --- webkit/tools/test_shell/test_shell_webblobregistry_impl.cc (revision 61866)
|
| +++ webkit/tools/test_shell/test_shell_webblobregistry_impl.cc (working copy)
|
| @@ -17,9 +17,13 @@
|
| using WebKit::WebString;
|
| using WebKit::WebURL;
|
|
|
| +namespace {
|
| +
|
| MessageLoop* g_io_thread;
|
| webkit_blob::BlobStorageController* g_blob_storage_controller;
|
|
|
| +} // namespace
|
| +
|
| /* static */
|
| void TestShellWebBlobRegistryImpl::InitializeOnIOThread(
|
| webkit_blob::BlobStorageController* blob_storage_controller) {
|
| @@ -39,15 +43,14 @@
|
| void TestShellWebBlobRegistryImpl::registerBlobURL(
|
| const WebURL& url, WebBlobData& data) {
|
| DCHECK(g_io_thread);
|
| + // Note: BlobData is not refcounted thread safe.
|
| scoped_refptr<webkit_blob::BlobData> blob_data(
|
| new webkit_blob::BlobData(data));
|
| - blob_data->AddRef(); // Release on DoRegisterBlobURL.
|
| g_io_thread->PostTask(
|
| FROM_HERE,
|
| - NewRunnableMethod(this,
|
| - &TestShellWebBlobRegistryImpl::DoRegisterBlobUrl,
|
| - url,
|
| - blob_data.get()));
|
| + NewRunnableMethod(
|
| + this, &TestShellWebBlobRegistryImpl::DoRegisterBlobUrl, url,
|
| + blob_data.release())); // Released in DoRegisterBlobUrl.
|
| }
|
|
|
| void TestShellWebBlobRegistryImpl::registerBlobURL(
|
|
|