Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: test/cctest/test-debug.cc

Issue 389573006: Change ScriptCompiler::CompileOptions and add d8 --cache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: even more rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-compiler.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 7303 matching lines...) Expand 10 before | Expand all | Expand 10 after
7314 "var a = b = c = 1; \n" 7314 "var a = b = c = 1; \n"
7315 "function this_is_lazy() { \n" 7315 "function this_is_lazy() { \n"
7316 // This symbol won't appear in the preparse data. 7316 // This symbol won't appear in the preparse data.
7317 " var a; \n" 7317 " var a; \n"
7318 "} \n" 7318 "} \n"
7319 "function bar() { \n" 7319 "function bar() { \n"
7320 " return \"bar\"; \n" 7320 " return \"bar\"; \n"
7321 "}; \n" 7321 "}; \n"
7322 "a = b = c = 2; \n" 7322 "a = b = c = 2; \n"
7323 "bar(); \n"; 7323 "bar(); \n";
7324 v8::Local<v8::Value> result = PreCompileCompileRun(source); 7324 v8::Local<v8::Value> result = ParserCacheCompileRun(source);
7325 CHECK(result->IsString()); 7325 CHECK(result->IsString());
7326 v8::String::Utf8Value utf8(result); 7326 v8::String::Utf8Value utf8(result);
7327 CHECK_EQ("bar", *utf8); 7327 CHECK_EQ("bar", *utf8);
7328 7328
7329 v8::Debug::SetDebugEventListener(NULL); 7329 v8::Debug::SetDebugEventListener(NULL);
7330 CheckDebuggerUnloaded(); 7330 CheckDebuggerUnloaded();
7331 } 7331 }
7332 7332
7333 7333
7334 static void DebugBreakStackTraceListener( 7334 static void DebugBreakStackTraceListener(
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
7398 v8::Isolate* isolate = env->GetIsolate(); 7398 v8::Isolate* isolate = env->GetIsolate();
7399 v8::HandleScope scope(isolate); 7399 v8::HandleScope scope(isolate);
7400 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate); 7400 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate);
7401 TerminationThread terminator(isolate); 7401 TerminationThread terminator(isolate);
7402 terminator.Start(); 7402 terminator.Start();
7403 v8::TryCatch try_catch; 7403 v8::TryCatch try_catch;
7404 v8::Debug::DebugBreak(isolate); 7404 v8::Debug::DebugBreak(isolate);
7405 CompileRun("while (true);"); 7405 CompileRun("while (true);");
7406 CHECK(try_catch.HasTerminated()); 7406 CHECK(try_catch.HasTerminated());
7407 } 7407 }
OLDNEW
« no previous file with comments | « test/cctest/test-compiler.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698