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

Unified 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 side-by-side diff with in-line comments
Download patch
« src/v8threads.cc ('K') | « test/cctest/SConscript ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-threads.cc
===================================================================
--- test/cctest/test-threads.cc (revision 0)
+++ test/cctest/test-threads.cc (revision 0)
@@ -0,0 +1,34 @@
+// Copyright 2006-2008 the V8 project authors. All rights reserved.
+
+// 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.
+// StringInputBuffer. Check that Get(int) works on very deep stacks
+// of ConsStrings. These operations may not be very fast, but they
+// should be possible without getting errors due to too deep recursion.
+
+#include "v8.h"
+
+#include "platform.h"
+
+#include "cctest.h"
+
+
+TEST(Preemption) {
+ v8::Locker locker;
+ v8::V8::Initialize();
+ v8::HandleScope scope;
+ v8::Context::Scope context_scope(v8::Context::New());
+
+ v8::Locker::StartPreemption(100);
+
+ v8::Handle<v8::Script> script = v8::Script::Compile(
+ v8::String::New("var count = 0; var obj = new Object(); count++;\n"));
+
+ script->Run();
+
+ v8::Locker::StopPreemption();
+ v8::internal::OS::Sleep(500); // Make sure the timer fires.
+
+ script->Run();
+}
+
+
« 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