Commit ce687e4b authored by dcarney@chromium.org's avatar dcarney@chromium.org

thread isolate for DebugMessage

R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23904012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2846d9f3
......@@ -106,6 +106,8 @@ class V8_EXPORT Debug {
*/
virtual ClientData* GetClientData() const = 0;
virtual Isolate* GetIsolate() const = 0;
virtual ~Message() {}
};
......
......@@ -38,7 +38,8 @@ namespace internal {
// 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* agent = Isolate::Current()->debugger_agent_instance();
Isolate* isolate = reinterpret_cast<Isolate*>(message.GetIsolate());
DebuggerAgent* agent = isolate->debugger_agent_instance();
ASSERT(agent != NULL);
agent->DebuggerMessage(message);
}
......
......@@ -3624,6 +3624,11 @@ v8::Handle<v8::Object> MessageImpl::GetExecutionState() const {
}
v8::Isolate* MessageImpl::GetIsolate() const {
return reinterpret_cast<v8::Isolate*>(exec_state_->GetIsolate());
}
v8::Handle<v8::Object> MessageImpl::GetEventData() const {
return v8::Utils::ToLocal(event_data_);
}
......
......@@ -668,6 +668,7 @@ class MessageImpl: public v8::Debug::Message {
virtual v8::Handle<v8::String> GetJSON() const;
virtual v8::Handle<v8::Context> GetEventContext() const;
virtual v8::Debug::ClientData* GetClientData() const;
virtual v8::Isolate* GetIsolate() const;
private:
MessageImpl(bool is_event,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment