Update to Chromium revision 66269.

- Fixes a crash with Flash-related JavaScript (issue #115).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@138 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2010-11-16 16:01:14 +00:00
parent 8c47cd961a
commit 239a283e02
10 changed files with 45 additions and 57 deletions

View File

@ -58,3 +58,4 @@ Date | CEF Revision | Chromium Revision
2010-10-21 | /trunk@122 | /trunk@63396 2010-10-21 | /trunk@122 | /trunk@63396
2010-10-26 | /trunk@127 | /trunk@63876 2010-10-26 | /trunk@127 | /trunk@63876
2010-10-28 | /trunk@129 | /trunk@64233 2010-10-28 | /trunk@129 | /trunk@64233
2010-11-16 | /trunk@138 | /trunk@66269

View File

@ -390,7 +390,6 @@ void BrowserAppCacheSystem::InitOnIOThread(URLRequestContext* request_context) {
DCHECK(!io_message_loop_); DCHECK(!io_message_loop_);
io_message_loop_ = MessageLoop::current(); io_message_loop_ = MessageLoop::current();
io_message_loop_->AddDestructionObserver(this);
if (!db_thread_.IsRunning()) if (!db_thread_.IsRunning())
db_thread_.Start(); db_thread_.Start();
@ -406,6 +405,19 @@ void BrowserAppCacheSystem::InitOnIOThread(URLRequestContext* request_context) {
AppCacheInterceptor::EnsureRegistered(); AppCacheInterceptor::EnsureRegistered();
} }
void BrowserAppCacheSystem::CleanupIOThread() {
DCHECK(is_io_thread());
delete backend_impl_;
delete service_;
backend_impl_ = NULL;
service_ = NULL;
io_message_loop_ = NULL;
// Just in case the main thread is waiting on it.
backend_proxy_->SignalEvent();
}
WebApplicationCacheHost* BrowserAppCacheSystem::CreateCacheHostForWebKit( WebApplicationCacheHost* BrowserAppCacheSystem::CreateCacheHostForWebKit(
WebApplicationCacheHostClient* client) { WebApplicationCacheHostClient* client) {
if (!is_initailized_on_ui_thread()) if (!is_initailized_on_ui_thread())
@ -435,16 +447,3 @@ void BrowserAppCacheSystem::GetExtraResponseBits(
request, cache_id, manifest_url); request, cache_id, manifest_url);
} }
} }
void BrowserAppCacheSystem::WillDestroyCurrentMessageLoop() {
DCHECK(is_io_thread());
delete backend_impl_;
delete service_;
backend_impl_ = NULL;
service_ = NULL;
io_message_loop_ = NULL;
// Just in case the main thread is waiting on it.
backend_proxy_->SignalEvent();
}

View File

@ -1,6 +1,6 @@
// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// source code is governed by a BSD-style license that can be found in the // Use of this source code is governed by a BSD-style license that can be
// LICENSE file. // found in the LICENSE file.
#ifndef _BROWSER_APPCACHE_SYSTEM_H #ifndef _BROWSER_APPCACHE_SYSTEM_H
#define _BROWSER_APPCACHE_SYSTEM_H #define _BROWSER_APPCACHE_SYSTEM_H
@ -28,7 +28,7 @@ class URLRequestContext;
// a UI thread on which webkit runs and an IO thread on which URLRequests // a UI thread on which webkit runs and an IO thread on which URLRequests
// are handled. This class conspires with BrowserResourceLoaderBridge to // are handled. This class conspires with BrowserResourceLoaderBridge to
// retrieve resources from the appcache. // retrieve resources from the appcache.
class BrowserAppCacheSystem : public MessageLoop::DestructionObserver { class BrowserAppCacheSystem {
public: public:
// Should be instanced somewhere in main(). If not instanced, the public // Should be instanced somewhere in main(). If not instanced, the public
// static methods are all safe no-ops. // static methods are all safe no-ops.
@ -51,6 +51,11 @@ class BrowserAppCacheSystem : public MessageLoop::DestructionObserver {
instance_->InitOnIOThread(request_context); instance_->InitOnIOThread(request_context);
} }
static void CleanupOnIOThread() {
if (instance_)
instance_->CleanupIOThread();
}
// Called by TestShellWebKitInit to manufacture a 'host' for webcore. // Called by TestShellWebKitInit to manufacture a 'host' for webcore.
static WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( static WebKit::WebApplicationCacheHost* CreateApplicationCacheHost(
WebKit::WebApplicationCacheHostClient* client) { WebKit::WebApplicationCacheHostClient* client) {
@ -108,6 +113,7 @@ class BrowserAppCacheSystem : public MessageLoop::DestructionObserver {
// Instance methods called by our static public methods // Instance methods called by our static public methods
void InitOnUIThread(const FilePath& cache_directory); void InitOnUIThread(const FilePath& cache_directory);
void InitOnIOThread(URLRequestContext* request_context); void InitOnIOThread(URLRequestContext* request_context);
void CleanupIOThread();
WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit( WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit(
WebKit::WebApplicationCacheHostClient* client); WebKit::WebApplicationCacheHostClient* client);
void SetExtraRequestBits(URLRequest* request, void SetExtraRequestBits(URLRequest* request,
@ -139,9 +145,6 @@ class BrowserAppCacheSystem : public MessageLoop::DestructionObserver {
return NULL; return NULL;
} }
// IOThread DestructionObserver
virtual void WillDestroyCurrentMessageLoop();
FilePath cache_directory_; FilePath cache_directory_;
MessageLoop* io_message_loop_; MessageLoop* io_message_loop_;
MessageLoop* ui_message_loop_; MessageLoop* ui_message_loop_;

View File

@ -24,26 +24,6 @@ using WebKit::WebVector;
namespace { namespace {
WebKit::WebFileError PlatformFileErrorToWebFileError(
base::PlatformFileError error_code) {
switch (error_code) {
case base::PLATFORM_FILE_ERROR_NOT_FOUND:
return WebKit::WebFileErrorNotFound;
case base::PLATFORM_FILE_ERROR_INVALID_OPERATION:
case base::PLATFORM_FILE_ERROR_EXISTS:
case base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY:
return WebKit::WebFileErrorInvalidModification;
case base::PLATFORM_FILE_ERROR_ACCESS_DENIED:
return WebKit::WebFileErrorNoModificationAllowed;
case base::PLATFORM_FILE_ERROR_FAILED:
return WebKit::WebFileErrorInvalidState;
case base::PLATFORM_FILE_ERROR_ABORT:
return WebKit::WebFileErrorAbort;
default:
return WebKit::WebFileErrorInvalidModification;
}
}
class BrowserFileSystemCallbackDispatcher class BrowserFileSystemCallbackDispatcher
: public fileapi::FileSystemCallbackDispatcher { : public fileapi::FileSystemCallbackDispatcher {
public: public:
@ -73,10 +53,10 @@ class BrowserFileSystemCallbackDispatcher
} }
virtual void DidReadDirectory( virtual void DidReadDirectory(
const std::vector<base::file_util_proxy::Entry>& entries, const std::vector<base::FileUtilProxy::Entry>& entries,
bool has_more) { bool has_more) {
std::vector<WebFileSystemEntry> web_entries_vector; std::vector<WebFileSystemEntry> web_entries_vector;
for (std::vector<base::file_util_proxy::Entry>::const_iterator it = for (std::vector<base::FileUtilProxy::Entry>::const_iterator it =
entries.begin(); it != entries.end(); ++it) { entries.begin(); it != entries.end(); ++it) {
WebFileSystemEntry entry; WebFileSystemEntry entry;
entry.name = webkit_glue::FilePathStringToWebString(it->name); entry.name = webkit_glue::FilePathStringToWebString(it->name);
@ -94,7 +74,8 @@ class BrowserFileSystemCallbackDispatcher
} }
virtual void DidFail(base::PlatformFileError error_code) { virtual void DidFail(base::PlatformFileError error_code) {
callbacks_->didFail(PlatformFileErrorToWebFileError(error_code)); callbacks_->didFail(
webkit_glue::PlatformFileErrorToWebFileError(error_code));
file_system_->RemoveCompletedOperation(request_id_); file_system_->RemoveCompletedOperation(request_id_);
} }

View File

@ -97,7 +97,7 @@ class BrowserFileWriter::IOThreadProxy
} }
virtual void DidReadDirectory( virtual void DidReadDirectory(
const std::vector<base::file_util_proxy::Entry>& entries, const std::vector<base::FileUtilProxy::Entry>& entries,
bool has_more) { bool has_more) {
NOTREACHED(); NOTREACHED();
} }

View File

@ -90,7 +90,7 @@ void BrowserRequestContext::Init(
host_resolver_ = host_resolver_ =
net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
NULL); NULL, NULL);
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
http_auth_handler_factory_ = http_auth_handler_factory_ =

View File

@ -7,7 +7,7 @@
#include "third_party/webkit/webcore/config.h" #include "third_party/webkit/webcore/config.h"
MSVC_PUSH_WARNING_LEVEL(0); MSVC_PUSH_WARNING_LEVEL(0);
#include "Cache.h" #include "MemoryCache.h"
#include "TextEncoding.h" #include "TextEncoding.h"
#include "third_party/WebKit/WebCore/platform/network/HTTPParsers.h" #include "third_party/WebKit/WebCore/platform/network/HTTPParsers.h"
#include "third_party/WebKit/WebKit/chromium/src/WebFrameImpl.h" #include "third_party/WebKit/WebKit/chromium/src/WebFrameImpl.h"

View File

@ -535,7 +535,8 @@ WebWorker* BrowserWebViewDelegate::createWorker(
WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer( WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
WebFrame* frame, WebMediaPlayerClient* client) { WebFrame* frame, WebMediaPlayerClient* client) {
media::MediaFilterCollection collection; scoped_ptr<media::MediaFilterCollection> collection(
new media::MediaFilterCollection());
appcache::WebApplicationCacheHostImpl* appcache_host = appcache::WebApplicationCacheHostImpl* appcache_host =
appcache::WebApplicationCacheHostImpl::FromFrame(frame); appcache::WebApplicationCacheHostImpl::FromFrame(frame);
@ -559,16 +560,16 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
appcache_host ? appcache_host->host_id() : appcache::kNoHostId, appcache_host ? appcache_host->host_id() : appcache::kNoHostId,
0); 0);
scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer = scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer(
new webkit_glue::VideoRendererImpl(false); new webkit_glue::VideoRendererImpl(false));
collection.push_back(video_renderer); collection->AddVideoRenderer(video_renderer);
// Add the audio renderer. // Add the audio renderer.
collection.push_back(new media::AudioRendererImpl()); collection->AddAudioRenderer(new media::AudioRendererImpl());
return new webkit_glue::WebMediaPlayerImpl( return new webkit_glue::WebMediaPlayerImpl(
client, collection, bridge_factory_simple, bridge_factory_buffered, client, collection.release(), bridge_factory_simple,
false, video_renderer); bridge_factory_buffered, false, video_renderer);
} }
WebApplicationCacheHost* BrowserWebViewDelegate::createApplicationCacheHost( WebApplicationCacheHost* BrowserWebViewDelegate::createApplicationCacheHost(
@ -806,7 +807,7 @@ void BrowserWebViewDelegate::reportFindInPageSelection(
} }
void BrowserWebViewDelegate::openFileSystem( void BrowserWebViewDelegate::openFileSystem(
WebFrame* frame, WebFileSystem::Type type, long long size, WebFrame* frame, WebFileSystem::Type type, long long size, bool create,
WebFileSystemCallbacks* callbacks) { WebFileSystemCallbacks* callbacks) {
if (browser_->file_system_root().empty()) { if (browser_->file_system_root().empty()) {
// The FileSystem temp directory was not initialized successfully. // The FileSystem temp directory was not initialized successfully.

View File

@ -178,6 +178,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
WebKit::WebFrame* frame, WebKit::WebFrame* frame,
WebKit::WebFileSystem::Type type, WebKit::WebFileSystem::Type type,
long long size, long long size,
bool create,
WebKit::WebFileSystemCallbacks* callbacks); WebKit::WebFileSystemCallbacks* callbacks);
// webkit_glue::WebPluginPageDelegate // webkit_glue::WebPluginPageDelegate

View File

@ -59,9 +59,11 @@ void CefProcessIOThread::CleanUp() {
// purify leak-test results. // purify leak-test results.
MessageLoop::current()->RunAllPending(); MessageLoop::current()->RunAllPending();
BrowserFileWriter::CleanupOnIOThread(); // In reverse order of initialization.
BrowserSocketStreamBridge::Cleanup();
BrowserWebBlobRegistryImpl::Cleanup(); BrowserWebBlobRegistryImpl::Cleanup();
BrowserSocketStreamBridge::Cleanup();
BrowserFileWriter::CleanupOnIOThread();
BrowserAppCacheSystem::CleanupOnIOThread();
_Context->set_request_context(NULL); _Context->set_request_context(NULL);
request_context_ = NULL; request_context_ = NULL;