| Index: src/api.cc
|
| ===================================================================
|
| --- src/api.cc (revision 1255)
|
| +++ src/api.cc (working copy)
|
| @@ -2893,8 +2893,11 @@
|
| EnsureInitialized("v8::Debug::SetDebugEventListener()");
|
| ON_BAILOUT("v8::Debug::SetDebugEventListener()", return false);
|
| HandleScope scope;
|
| - i::Debugger::SetEventListener(i::Factory::NewProxy(FUNCTION_ADDR(that)),
|
| - Utils::OpenHandle(*data));
|
| + i::Handle<i::Object> proxy = i::Factory::undefined_value();
|
| + if (that != NULL) {
|
| + proxy = i::Factory::NewProxy(FUNCTION_ADDR(that));
|
| + }
|
| + i::Debugger::SetEventListener(proxy, Utils::OpenHandle(*data));
|
| return true;
|
| }
|
|
|
|
|