diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-22 21:52:14 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-22 21:52:14 +0000 |
commit | 689f0efd976c1882a40f3fa9344c0b1a57384f2e (patch) | |
tree | c6840ad2a6637db2855d8d7798e80fc48036b450 | |
parent | 3ad4ef741fea0b276415e43e724eb909e898b5fc (diff) | |
download | chromium_src-689f0efd976c1882a40f3fa9344c0b1a57384f2e.zip chromium_src-689f0efd976c1882a40f3fa9344c0b1a57384f2e.tar.gz chromium_src-689f0efd976c1882a40f3fa9344c0b1a57384f2e.tar.bz2 |
Revert 189913 "Proxy queryUsageAndQuota from worker process"
Breaks stuff:
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASAN%20Tests%20%282%29/builds/7567/steps/content_unittests/logs/stdio
[ RUN ] DatabaseTrackerTest.DatabaseTrackerQuotaIntegration
ASAN:SIGSEGV
=================================================================
==8773== ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000594b426 sp 0x7fff3276b160 bp 0x7fff3276b230 T0)
AddressSanitizer can not provide additional info.
#0 0x594b425 in webkit_database::DatabaseQuotaClient::~DatabaseQuotaClient() /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../webkit/database/database_quota_client.cc:104:0
#1 0x594b35d in webkit_database::DatabaseQuotaClient::~DatabaseQuotaClient() /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../webkit/database/database_quota_client.cc:103:0
#2 0x1363008 in SimulateQuotaManagerDestroyed /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../webkit/database/database_tracker_unittest.cc:128:0
#3 0x1363008 in webkit_database::DatabaseTracker_TestHelper_Test::DatabaseTrackerQuotaIntegration() /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../webkit/database/database_tracker_unittest.cc:530:0
#4 0x31f9527 in testing::Test::Run() /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../testing/gtest/src/gtest.cc:2067:0
#5 0x31fb075 in testing::TestInfo::Run() /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../testing/gtest/src/gtest.cc:2244:0
#6 0x31fbecc in testing::TestCase::Run() /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../testing/gtest/src/gtest.cc:2351:0
#7 0x3208d80 in testing::internal::UnitTestImpl::RunAllTests() /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../testing/gtest/src/gtest.cc:4177:0
#8 0x3208310 in impl /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../testing/gtest/src/gtest.cc:2051:0
#9 0x3208310 in testing::UnitTest::Run() /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../testing/gtest/src/gtest.cc:3810:0
#10 0x7014bea in base::TestSuite::Run() /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../base/test/test_suite.cc:167:0
#11 0x104dec6 in main /b/build/slave/Linux_ASAN_Builder/build/src/out/Release/../../content/test/run_all_unittests.cc:9:0
#12 0x7f32cba7b76c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
#13 0x453e24 in _start ??:0
==8773== ABORTING
> Proxy queryUsageAndQuota from worker process
>
> BUG=88490
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=189731
>
> Review URL: https://codereview.chromium.org/12948002
TBR=alecflett@chromium.org
Review URL: https://codereview.chromium.org/13033003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189918 0039d316-1c4b-4281-b951-d872f2087c98
7 files changed, 1 insertions, 41 deletions
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index b706674..e248705 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -646,7 +646,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { storage_partition_impl_->GetURLRequestContext(), storage_partition_impl_->GetMediaURLRequestContext(), storage_partition_impl_->GetAppCacheService(), - storage_partition_impl_->GetQuotaManager(), storage_partition_impl_->GetFileSystemContext(), storage_partition_impl_->GetDatabaseTracker(), storage_partition_impl_->GetIndexedDBContext()), diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc index faad9e2..56a2e59 100644 --- a/content/browser/worker_host/worker_process_host.cc +++ b/content/browser/worker_host/worker_process_host.cc @@ -27,7 +27,6 @@ #include "content/browser/mime_registry_message_filter.h" #include "content/browser/renderer_host/database_message_filter.h" #include "content/browser/renderer_host/file_utilities_message_filter.h" -#include "content/browser/renderer_host/quota_dispatcher_host.h" #include "content/browser/renderer_host/render_view_host_delegate.h" #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" @@ -261,10 +260,6 @@ void WorkerProcessHost::CreateMessageFilters(int render_process_id) { process_->GetHost()->AddFilter(new MimeRegistryMessageFilter()); process_->GetHost()->AddFilter( new DatabaseMessageFilter(partition_.database_tracker())); - process_->GetHost()->AddFilter(new QuotaDispatcherHost( - process_->GetData().id, - partition_.quota_manager(), - GetContentClient()->browser()->CreateQuotaPermissionContext())); SocketStreamDispatcherHost* socket_stream_dispatcher_host = new SocketStreamDispatcherHost( @@ -331,7 +326,7 @@ bool WorkerProcessHost::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowFileSystem, OnAllowFileSystem) IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowIndexedDB, OnAllowIndexedDB) IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP_EX() + IPC_END_MESSAGE_MAP_EX() if (!msg_is_ok) { NOTREACHED(); diff --git a/content/browser/worker_host/worker_storage_partition.cc b/content/browser/worker_host/worker_storage_partition.cc index f9d47d1..ad564c3 100644 --- a/content/browser/worker_host/worker_storage_partition.cc +++ b/content/browser/worker_host/worker_storage_partition.cc @@ -11,7 +11,6 @@ #include "net/url_request/url_request_context_getter.h" #include "webkit/database/database_tracker.h" #include "webkit/fileapi/file_system_context.h" -#include "webkit/quota/quota_manager.h" namespace content { @@ -19,14 +18,12 @@ WorkerStoragePartition::WorkerStoragePartition( net::URLRequestContextGetter* url_request_context, net::URLRequestContextGetter* media_url_request_context, ChromeAppCacheService* appcache_service, - quota::QuotaManager* quota_manager, fileapi::FileSystemContext* filesystem_context, webkit_database::DatabaseTracker* database_tracker, IndexedDBContextImpl* indexed_db_context) : url_request_context_(url_request_context), media_url_request_context_(media_url_request_context), appcache_service_(appcache_service), - quota_manager_(quota_manager), filesystem_context_(filesystem_context), database_tracker_(database_tracker), indexed_db_context_(indexed_db_context) { @@ -48,7 +45,6 @@ bool WorkerStoragePartition::Equals( return url_request_context_ == other.url_request_context_ && media_url_request_context_ == other.media_url_request_context_ && appcache_service_ == other.appcache_service_ && - quota_manager_ == other.quota_manager_ && filesystem_context_ == other.filesystem_context_ && database_tracker_ == other.database_tracker_ && indexed_db_context_ == other.indexed_db_context_; @@ -61,7 +57,6 @@ void WorkerStoragePartition::Copy(const WorkerStoragePartition& other) { url_request_context_ = other.url_request_context_; media_url_request_context_ = other.media_url_request_context_; appcache_service_ = other.appcache_service_; - quota_manager_ = other.quota_manager_; filesystem_context_ = other.filesystem_context_; database_tracker_ = other.database_tracker_; indexed_db_context_ = other.indexed_db_context_; diff --git a/content/browser/worker_host/worker_storage_partition.h b/content/browser/worker_host/worker_storage_partition.h index 49c2deae..1b59b90 100644 --- a/content/browser/worker_host/worker_storage_partition.h +++ b/content/browser/worker_host/worker_storage_partition.h @@ -7,10 +7,6 @@ #include "base/memory/ref_counted.h" -namespace quota { -class QuotaManager; -} - namespace fileapi { class FileSystemContext; } // namespace fileapi @@ -45,7 +41,6 @@ class WorkerStoragePartition { net::URLRequestContextGetter* url_request_context, net::URLRequestContextGetter* media_url_request_context, ChromeAppCacheService* appcache_service, - quota::QuotaManager* quota_manager, fileapi::FileSystemContext* filesystem_context, webkit_database::DatabaseTracker* database_tracker, IndexedDBContextImpl* indexed_db_context); @@ -71,10 +66,6 @@ class WorkerStoragePartition { return appcache_service_.get(); } - quota::QuotaManager* quota_manager() const { - return quota_manager_.get(); - } - fileapi::FileSystemContext* filesystem_context() const { return filesystem_context_.get(); } @@ -93,7 +84,6 @@ class WorkerStoragePartition { scoped_refptr<net::URLRequestContextGetter> url_request_context_; scoped_refptr<net::URLRequestContextGetter> media_url_request_context_; scoped_refptr<ChromeAppCacheService> appcache_service_; - scoped_refptr<quota::QuotaManager> quota_manager_; scoped_refptr<fileapi::FileSystemContext> filesystem_context_; scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; scoped_refptr<IndexedDBContextImpl> indexed_db_context_; diff --git a/content/worker/websharedworkerclient_proxy.cc b/content/worker/websharedworkerclient_proxy.cc index 049361e..01913cb 100644 --- a/content/worker/websharedworkerclient_proxy.cc +++ b/content/worker/websharedworkerclient_proxy.cc @@ -9,7 +9,6 @@ #include "base/message_loop.h" #include "content/common/fileapi/file_system_dispatcher.h" #include "content/common/fileapi/webfilesystem_callback_dispatcher.h" -#include "content/common/quota_dispatcher.h" #include "content/common/webmessageportchannel_impl.h" #include "content/common/worker_messages.h" #include "content/public/common/content_switches.h" @@ -178,14 +177,6 @@ bool WebSharedWorkerClientProxy::allowIndexedDB(const WebKit::WebString& name) { return result; } -void WebSharedWorkerClientProxy::queryUsageAndQuota( - WebKit::WebStorageQuotaType type, - WebKit::WebStorageQuotaCallbacks* callbacks) { - ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota( - stub_->url().GetOrigin(), static_cast<quota::StorageType>(type), - QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); -} - void WebSharedWorkerClientProxy::dispatchDevToolsMessage( const WebString& message) { if (devtools_agent_) diff --git a/content/worker/websharedworkerclient_proxy.h b/content/worker/websharedworkerclient_proxy.h index d560628..bc26a29 100644 --- a/content/worker/websharedworkerclient_proxy.h +++ b/content/worker/websharedworkerclient_proxy.h @@ -11,8 +11,6 @@ #include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerClient.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallbacks.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h" namespace WebKit { class WebApplicationCacheHost; @@ -83,8 +81,6 @@ class WebSharedWorkerClientProxy : public WebKit::WebSharedWorkerClient { bool create, WebKit::WebFileSystemCallbacks* callbacks); virtual bool allowIndexedDB(const WebKit::WebString&); - virtual void queryUsageAndQuota(WebKit::WebStorageQuotaType, - WebKit::WebStorageQuotaCallbacks*); virtual void dispatchDevToolsMessage(const WebKit::WebString&); virtual void saveDevToolsAgentState(const WebKit::WebString&); diff --git a/webkit/database/database_quota_client.cc b/webkit/database/database_quota_client.cc index 2a985a5..1631e7d 100644 --- a/webkit/database/database_quota_client.cc +++ b/webkit/database/database_quota_client.cc @@ -101,12 +101,6 @@ DatabaseQuotaClient::DatabaseQuotaClient( } DatabaseQuotaClient::~DatabaseQuotaClient() { - if (!db_tracker_thread_->RunsTasksOnCurrentThread()) { - DatabaseTracker* tracker = db_tracker_; - tracker->AddRef(); - db_tracker_ = NULL; - db_tracker_thread_->ReleaseSoon(FROM_HERE, tracker); - } } QuotaClient::ID DatabaseQuotaClient::id() const { |