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

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

Issue 14483: Fix issue 142 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years 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
« src/v8threads.cc ('K') | « test/cctest/SConscript ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2
3 // Check that we can traverse very deep stacks of ConsStrings using
Erik Corry 2008/12/17 14:30:07 Stale comment (should be replaced with copyright b
iposva 2008/12/17 17:39:24 Done.
4 // StringInputBuffer. Check that Get(int) works on very deep stacks
5 // of ConsStrings. These operations may not be very fast, but they
6 // should be possible without getting errors due to too deep recursion.
7
8 #include "v8.h"
9
10 #include "platform.h"
11
12 #include "cctest.h"
13
14
15 TEST(Preemption) {
16 v8::Locker locker;
17 v8::V8::Initialize();
18 v8::HandleScope scope;
19 v8::Context::Scope context_scope(v8::Context::New());
20
21 v8::Locker::StartPreemption(100);
22
23 v8::Handle<v8::Script> script = v8::Script::Compile(
24 v8::String::New("var count = 0; var obj = new Object(); count++;\n"));
25
26 script->Run();
27
28 v8::Locker::StopPreemption();
29 v8::internal::OS::Sleep(500); // Make sure the timer fires.
30
31 script->Run();
32 }
33
34
OLDNEW
« src/v8threads.cc ('K') | « test/cctest/SConscript ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698