Review URL: http://codereview.chromium.org/1756018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4534
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
}
Local<Context> Debug::GetDebugContext() {
+ EnsureInitialized("v8::Debug::GetDebugContext()");
ENTER_V8;
return Utils::ToLocal(i::Debugger::GetDebugContext());
}
}
+TEST(DebugContextIsPreservedBetweenAccesses) {
+ v8::HandleScope scope;
+ v8::Local<v8::Context> context1 = v8::Debug::GetDebugContext();
+ v8::Local<v8::Context> context2 = v8::Debug::GetDebugContext();
+ CHECK_EQ(*context1, *context2);
+ // Make sure debugger is unloaded before running other tests.
+ v8::internal::ForceUnloadDebugger();
+ CheckDebuggerUnloaded();
+}