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

Unified Diff: test/cctest/test-api.cc

Issue 25002004: make v8::Locker not use Isolate::GetCurrent() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/v8threads.cc ('k') | test/cctest/test-threads.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 7a2f9def679f84b3bea8f9ab4d3a1f52f500c687..a24be6eab0e63e31be8c4be7f999d07e3d245216 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -14218,14 +14218,15 @@ class RegExpInterruptTest {
gc_success_ = false;
GCThread gc_thread(this);
gc_thread.Start();
- v8::Locker::StartPreemption(1);
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::Locker::StartPreemption(isolate, 1);
LongRunningRegExp();
{
- v8::Unlocker unlock(CcTest::isolate());
+ v8::Unlocker unlock(isolate);
gc_thread.Join();
}
- v8::Locker::StopPreemption();
+ v8::Locker::StopPreemption(isolate);
CHECK(regexp_success_);
CHECK(gc_success_);
}
@@ -14340,14 +14341,15 @@ class ApplyInterruptTest {
gc_success_ = false;
GCThread gc_thread(this);
gc_thread.Start();
- v8::Locker::StartPreemption(1);
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::Locker::StartPreemption(isolate, 1);
LongRunningApply();
{
- v8::Unlocker unlock(CcTest::isolate());
+ v8::Unlocker unlock(isolate);
gc_thread.Join();
}
- v8::Locker::StopPreemption();
+ v8::Locker::StopPreemption(isolate);
CHECK(apply_success_);
CHECK(gc_success_);
}
@@ -14627,6 +14629,7 @@ class RegExpStringModificationTest {
uc16_resource_(i::Vector<const uint16_t>(two_byte_content_, 15)) {}
~RegExpStringModificationTest() {}
void RunTest() {
+ v8::Isolate* isolate = CcTest::isolate();
i::Factory* factory = CcTest::i_isolate()->factory();
regexp_success_ = false;
@@ -14655,13 +14658,13 @@ class RegExpStringModificationTest {
MorphThread morph_thread(this);
morph_thread.Start();
- v8::Locker::StartPreemption(1);
+ v8::Locker::StartPreemption(isolate, 1);
LongRunningRegExp();
{
- v8::Unlocker unlock(CcTest::isolate());
+ v8::Unlocker unlock(isolate);
morph_thread.Join();
}
- v8::Locker::StopPreemption();
+ v8::Locker::StopPreemption(isolate);
CHECK(regexp_success_);
CHECK(morph_success_);
}
« no previous file with comments | « src/v8threads.cc ('k') | test/cctest/test-threads.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698