Don't use local variable after its scoped has been left.

TBR=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
svenpanne@chromium.org 2013-02-12 08:59:53 +00:00
parent 9bb68394a0
commit abeed3d055

View File

@ -1497,7 +1497,6 @@ void Shell::RunShell(Isolate* isolate) {
Context::Scope context_scope(evaluation_context_);
HandleScope outer_scope;
Handle<String> name = String::New("(d8)");
DumbLineEditor dumb_line_editor(isolate);
LineEditor* console = LineEditor::Get();
printf("V8 version %s [console: %s]\n", V8::GetVersion(), console->name());
console->Open();
@ -1902,6 +1901,7 @@ int Shell::Main(int argc, char* argv[]) {
if (!SetOptions(argc, argv)) return 1;
int result = 0;
Isolate* isolate = Isolate::GetCurrent();
DumbLineEditor dumb_line_editor(isolate);
{
Initialize(isolate);
Symbols symbols(isolate);