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

Unified Diff: src/debug-agent.cc

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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 | « src/debug-agent.h ('k') | src/debug-debugger.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-agent.cc
===================================================================
--- src/debug-agent.cc (revision 7267)
+++ src/debug-agent.cc (working copy)
@@ -38,11 +38,11 @@
// Public V8 debugger API message handler function. This function just delegates
// to the debugger agent through it's data parameter.
void DebuggerAgentMessageHandler(const v8::Debug::Message& message) {
- DebuggerAgent::instance_->DebuggerMessage(message);
+ DebuggerAgent* agent = Isolate::Current()->debugger_agent_instance();
+ ASSERT(agent != NULL);
+ agent->DebuggerMessage(message);
}
-// static
-DebuggerAgent* DebuggerAgent::instance_ = NULL;
// Debugger agent main thread.
void DebuggerAgent::Run() {
@@ -102,20 +102,21 @@
listening_->Wait();
}
+static const char* kCreateSessionMessage =
+ "Remote debugging session already active\r\n";
+
void DebuggerAgent::CreateSession(Socket* client) {
ScopedLock with(session_access_);
// If another session is already established terminate this one.
if (session_ != NULL) {
- static const char* message = "Remote debugging session already active\r\n";
-
- client->Send(message, StrLength(message));
+ client->Send(kCreateSessionMessage, StrLength(kCreateSessionMessage));
delete client;
return;
}
// Create a new session and hook up the debug message handler.
- session_ = new DebuggerAgentSession(this, client);
+ session_ = new DebuggerAgentSession(isolate(), this, client);
v8::Debug::SetMessageHandler2(DebuggerAgentMessageHandler);
session_->Start();
}
@@ -224,8 +225,8 @@
}
-const char* DebuggerAgentUtil::kContentLength = "Content-Length";
-int DebuggerAgentUtil::kContentLengthSize =
+const char* const DebuggerAgentUtil::kContentLength = "Content-Length";
+const int DebuggerAgentUtil::kContentLengthSize =
StrLength(kContentLength);
« no previous file with comments | « src/debug-agent.h ('k') | src/debug-debugger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698