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
This commit is contained in:
dcarney@chromium.org 2013-09-10 14:26:07 +00:00
parent 2846d9f394
commit ce687e4bed
4 changed files with 10 additions and 1 deletions

View File

@ -106,6 +106,8 @@ class V8_EXPORT Debug {
*/
virtual ClientData* GetClientData() const = 0;
virtual Isolate* GetIsolate() const = 0;
virtual ~Message() {}
};

View File

@ -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);
}

View File

@ -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_);
}

View File

@ -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,