Changed the debugger message API to receive an object instead of a JSON string.
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 29 Apr 2009 08:23:58 +0000 (08:23 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 29 Apr 2009 08:23:58 +0000 (08:23 +0000)
commit95288e916e4fed9ecf4a36d8db7da465484d3c98
treeee7d300a3c72654f92c73e56227048a6fddb8936
parenta6434ab5e43f08faa66396e39955e0942f5425c7
Changed the debugger message API to receive an object instead of a JSON string.

The object delivered to the debug message handler contains additional information on the current break handling the messages.

Clients which require just JSON message parsing can simply get the JSON using the GetJSON message on the message object to still have the previous behaviour.

  NewMessageHangler(const v8::Debug::Message& message) {
    v8::String::Value val(message.GetJSON());
    OldMessageHandler(Vector<uint16_t>(const_cast<uint16_t*>(*val), val.length()));
  }

Refactored some of the debugger code to use internal handles instead of API handles. Also changed Object to JSObject is some places.

The access to the active context when the break occurred is still not implemented. I will add this in a new CL, as this one is quite big already.
Review URL: http://codereview.chromium.org/99122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
include/v8-debug.h
src/debug-agent.cc
src/debug-agent.h
src/debug.cc
src/debug.h
test/cctest/test-debug.cc