Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Unified Diff: webkit/glue/webdevtoolsagent_impl.cc

Issue 100159: DevTools: keep links on the edited styles so that they are not collected betw... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webdevtoolsagent_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webdevtoolsagent_impl.cc
===================================================================
--- webkit/glue/webdevtoolsagent_impl.cc (revision 14839)
+++ webkit/glue/webdevtoolsagent_impl.cc (working copy)
@@ -56,6 +56,9 @@
}
WebDevToolsAgentImpl::~WebDevToolsAgentImpl() {
+ if (!utility_context_.IsEmpty()) {
+ utility_context_.Dispose();
+ }
}
void WebDevToolsAgentImpl::Attach() {
@@ -73,7 +76,10 @@
Page* page = web_view_impl_->page();
Document* doc = page->mainFrame()->document();
if (doc) {
- debugger_agent_impl_->SetDocument(doc);
+ // Reuse existing context in case detached/attached.
+ if (utility_context_.IsEmpty()) {
+ debugger_agent_impl_->CreateUtilityContext(doc, &utility_context_);
+ }
dom_agent_impl_->SetDocument(doc);
net_agent_impl_->SetDocument(doc);
}
@@ -110,7 +116,7 @@
} else {
doc = NULL;
}
- debugger_agent_impl_->SetDocument(doc);
+ debugger_agent_impl_->CreateUtilityContext(doc, &utility_context_);
dom_agent_impl_->SetDocument(doc);
net_agent_impl_->SetDocument(doc);
}
@@ -197,8 +203,8 @@
String result;
String exception;
if (node) {
- result = debugger_agent_impl_->ExecuteUtilityFunction(function_name, node,
- json_args, &exception);
+ result = debugger_agent_impl_->ExecuteUtilityFunction(utility_context_,
+ function_name, node, json_args, &exception);
}
tools_agent_delegate_stub_->DidExecuteUtilityFunction(call_id,
result, exception);
« no previous file with comments | « webkit/glue/webdevtoolsagent_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698