Commit a7d1cb3f authored by yurys@chromium.org's avatar yurys@chromium.org

Revert "Deprecate some debugger methods"

This reverts commit 69957c36edaebe0b9b614099eb1b067fb0208671. Blink roll this patch depends on was reverted for some reason.

BUG=None
TBR=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9f65cf6b
......@@ -245,9 +245,8 @@ class EXPORT Debug {
typedef void (*DebugMessageDispatchHandler)();
// Set a C debug event listener.
V8_DEPRECATED(static bool SetDebugEventListener(
EventCallback that,
Handle<Value> data = Handle<Value>()));
static bool SetDebugEventListener(EventCallback that,
Handle<Value> data = Handle<Value>());
static bool SetDebugEventListener2(EventCallback2 that,
Handle<Value> data = Handle<Value>());
......@@ -275,9 +274,8 @@ class EXPORT Debug {
// Message based interface. The message protocol is JSON. NOTE the message
// handler thread is not supported any more parameter must be false.
V8_DEPRECATED(static void SetMessageHandler(
MessageHandler handler,
bool message_handler_thread = false));
static void SetMessageHandler(MessageHandler handler,
bool message_handler_thread = false);
static void SetMessageHandler2(MessageHandler2 handler);
// If no isolate is provided the default isolate is
......
......@@ -50,12 +50,14 @@ void PrintPrompt() {
}
void HandleDebugEvent(const Debug::EventDetails& event_details) {
void HandleDebugEvent(DebugEvent event,
Handle<Object> exec_state,
Handle<Object> event_data,
Handle<Value> data) {
// TODO(svenpanne) There should be a way to retrieve this in the callback.
Isolate* isolate = Isolate::GetCurrent();
HandleScope scope(isolate);
DebugEvent event = event_details.GetEvent();
// Check for handled event.
if (event != Break && event != Exception && event != AfterCompile) {
return;
......@@ -65,7 +67,6 @@ void HandleDebugEvent(const Debug::EventDetails& event_details) {
// Get the toJSONProtocol function on the event and get the JSON format.
Local<String> to_json_fun_name = String::New("toJSONProtocol");
Handle<Object> event_data = event_details.GetEventData();
Local<Function> to_json_fun =
Local<Function>::Cast(event_data->Get(to_json_fun_name));
Local<Value> event_json = to_json_fun->Call(event_data, 0, NULL);
......@@ -90,7 +91,6 @@ void HandleDebugEvent(const Debug::EventDetails& event_details) {
// Get the debug command processor.
Local<String> fun_name = String::New("debugCommandProcessor");
Handle<Object> exec_state = event_details.GetExecutionState();
Local<Function> fun = Local<Function>::Cast(exec_state->Get(fun_name));
Local<Object> cmd_processor =
Local<Object>::Cast(fun->Call(exec_state, 0, NULL));
......
......@@ -36,7 +36,10 @@
namespace v8 {
void HandleDebugEvent(const Debug::EventDetails& event_details);
void HandleDebugEvent(DebugEvent event,
Handle<Object> exec_state,
Handle<Object> event_data,
Handle<Value> data);
// Start the remove debugger connecting to a V8 debugger agent on the specified
// port.
......
......@@ -810,7 +810,7 @@ void Shell::InstallUtilityScript(Isolate* isolate) {
#ifdef ENABLE_DEBUGGER_SUPPORT
// Start the in-process debugger if requested.
if (i::FLAG_debugger && !i::FLAG_debugger_agent) {
v8::Debug::SetDebugEventListener2(HandleDebugEvent);
v8::Debug::SetDebugEventListener(HandleDebugEvent);
}
#endif // ENABLE_DEBUGGER_SUPPORT
}
......
......@@ -29,7 +29,6 @@
#include <stdlib.h>
#define V8_DISABLE_DEPRECATIONS 1
#include "v8.h"
#include "api.h"
......@@ -40,7 +39,6 @@
#include "platform.h"
#include "stub-cache.h"
#include "utils.h"
#undef V8_DISABLE_DEPRECATIONS
using ::v8::internal::EmbeddedVector;
......
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