Index: src/debug/debug.cc |
diff --git a/src/debug/debug.cc b/src/debug/debug.cc |
index 214d72e7c27abd486a994b5f33b7f7149d29071a..46e37fa2e043cc9d6bcc0e48b0ef892e9d14769b 100644 |
--- a/src/debug/debug.cc |
+++ b/src/debug/debug.cc |
@@ -537,9 +537,13 @@ bool Debug::Load() { |
// Create the debugger context. |
HandleScope scope(isolate_); |
ExtensionConfiguration no_extensions; |
+ // TODO(yangguo): we rely on the fact that first context snapshot is usable |
+ // as debug context. This dependency is gone once we remove |
+ // debug context completely. |
+ static const int kFirstContextSnapshotIndex = 0; |
Handle<Context> context = isolate_->bootstrapper()->CreateEnvironment( |
MaybeHandle<JSGlobalProxy>(), v8::Local<ObjectTemplate>(), &no_extensions, |
- DEBUG_CONTEXT); |
+ kFirstContextSnapshotIndex, DEBUG_CONTEXT); |
// Fail if no context could be created. |
if (context.is_null()) return false; |