Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index b4e1fe90c4859e202f8f4dbd6581d02747bb94a7..a3db17840a230d27637e5a49da60c46118043498 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -2659,6 +2659,7 @@ RUNTIME_FUNCTION(Runtime_GetDebugContext) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 0); |
Handle<Context> context = isolate->debug()->GetDebugContext(); |
+ if (context.is_null()) return isolate->heap()->undefined_value(); |
context->set_security_token(isolate->native_context()->security_token()); |
return context->global_proxy(); |
} |