diff options
author | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-18 09:37:57 +0000 |
---|---|---|
committer | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-18 09:37:57 +0000 |
commit | 5d965c650ca5eb0e0c5eae72a8ee96a535b3cc4f (patch) | |
tree | e037a011cf80a1559822398da644f23fda4833d5 /webkit/glue | |
parent | 6a4bdfdacd60d421fa6207f3ded76b3c860be7bd (diff) | |
download | chromium_src-5d965c650ca5eb0e0c5eae72a8ee96a535b3cc4f.zip chromium_src-5d965c650ca5eb0e0c5eae72a8ee96a535b3cc4f.tar.gz chromium_src-5d965c650ca5eb0e0c5eae72a8ee96a535b3cc4f.tar.bz2 |
DevTools: the context should be disposed to releas scripts and other resources it may hold.
Review URL: http://codereview.chromium.org/132012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18699 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/webdevtoolsagent_impl.cc | 5 | ||||
-rw-r--r-- | webkit/glue/webdevtoolsagent_impl.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/webkit/glue/webdevtoolsagent_impl.cc b/webkit/glue/webdevtoolsagent_impl.cc index cd8e30ac..d885b01 100644 --- a/webkit/glue/webdevtoolsagent_impl.cc +++ b/webkit/glue/webdevtoolsagent_impl.cc @@ -61,6 +61,10 @@ WebDevToolsAgentImpl::WebDevToolsAgentImpl( WebDevToolsAgentImpl::~WebDevToolsAgentImpl() { DebuggerAgentManager::OnWebViewClosed(web_view_impl_); + DisposeUtilityContext(); +} + +void WebDevToolsAgentImpl::DisposeUtilityContext() { if (!utility_context_.IsEmpty()) { utility_context_.Dispose(); utility_context_.Clear(); @@ -140,6 +144,7 @@ void WebDevToolsAgentImpl::DidCommitLoadForFrame( WebFrame* frame, bool is_new_navigation) { if (!attached_) { + DisposeUtilityContext(); return; } WebDataSource* ds = frame->GetDataSource(); diff --git a/webkit/glue/webdevtoolsagent_impl.h b/webkit/glue/webdevtoolsagent_impl.h index 60ca0fe..64fd205 100644 --- a/webkit/glue/webdevtoolsagent_impl.h +++ b/webkit/glue/webdevtoolsagent_impl.h @@ -82,6 +82,7 @@ class WebDevToolsAgentImpl private: static v8::Handle<v8::Value> JsDispatchOnClient(const v8::Arguments& args); static v8::Handle<v8::Value> JsGetNodeForId(const v8::Arguments& args); + void DisposeUtilityContext(); void InitDevToolsAgentHost(); |