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; |
} |