Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/JsEngine.cpp

Issue 29691607: Issue 6365 - dispose v8::Isolate with a long enough delay (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created Feb. 7, 2018, 2:26 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsEngine.cpp
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp
index 0816304a75f1e3ff8e0b3f3f09fa7ef98ceaa74d..eee2d02d2799bd9e195accd802d596a0cbe535f6 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -85,7 +85,12 @@ AdblockPlus::ScopedV8Isolate::ScopedV8Isolate()
AdblockPlus::ScopedV8Isolate::~ScopedV8Isolate()
{
- isolate->Dispose();
+ auto capturedIsolatePtr = isolate;
+ std::thread([capturedIsolatePtr]{
anton 2018/02/07 14:43:12 shouldn't `{`it be on the next line?
sergei 2018/02/07 14:54:20 Done.
+ std::chrono::seconds timeout(60 * 10);
+ std::this_thread::sleep_for(timeout);
+ capturedIsolatePtr->Dispose();
+ }).detach();
isolate = nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld