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

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

Issue 1522703002: Add Isolate::DiscardThreadSpecificMetadata method to embedder API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove rocketsoftware wildcard from AUTHORS Created 5 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
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-lockers.cc
diff --git a/test/cctest/test-lockers.cc b/test/cctest/test-lockers.cc
index 56a386a9fe5e92154e1b78e1077cd09fdb558c61..385366aa24da0cfb9bf4039b65bce522659792ec 100644
--- a/test/cctest/test-lockers.cc
+++ b/test/cctest/test-lockers.cc
@@ -347,26 +347,31 @@ class LockerUnlockerThread : public JoinableThread {
}
virtual void Run() {
- v8::Locker lock(isolate_);
- v8::Isolate::Scope isolate_scope(isolate_);
- v8::HandleScope handle_scope(isolate_);
- v8::Local<v8::Context> context = v8::Context::New(isolate_);
- {
- v8::Context::Scope context_scope(context);
- CalcFibAndCheck(context);
- }
+ isolate_->DiscardThreadSpecificMetadata(); // No-op
{
- LockIsolateAndCalculateFibSharedContextThread thread(isolate_, context);
- isolate_->Exit();
- v8::Unlocker unlocker(isolate_);
- thread.Start();
- thread.Join();
- }
- isolate_->Enter();
- {
- v8::Context::Scope context_scope(context);
- CalcFibAndCheck(context);
+ v8::Locker lock(isolate_);
+ v8::Isolate::Scope isolate_scope(isolate_);
+ v8::HandleScope handle_scope(isolate_);
+ v8::Local<v8::Context> context = v8::Context::New(isolate_);
+ {
+ v8::Context::Scope context_scope(context);
+ CalcFibAndCheck(context);
+ }
+ {
+ LockIsolateAndCalculateFibSharedContextThread thread(isolate_, context);
+ isolate_->Exit();
+ v8::Unlocker unlocker(isolate_);
+ thread.Start();
+ thread.Join();
+ }
+ isolate_->Enter();
+ {
+ v8::Context::Scope context_scope(context);
+ CalcFibAndCheck(context);
+ }
}
+ isolate_->DiscardThreadSpecificMetadata();
+ isolate_->DiscardThreadSpecificMetadata(); // No-op
}
private:
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698