Index: src/JsEngine.cpp |
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp |
index 0816304a75f1e3ff8e0b3f3f09fa7ef98ceaa74d..ce9918469ab86d202d9231c9016e8a43baf90e54 100644 |
--- a/src/JsEngine.cpp |
+++ b/src/JsEngine.cpp |
@@ -85,7 +85,13 @@ AdblockPlus::ScopedV8Isolate::ScopedV8Isolate() |
AdblockPlus::ScopedV8Isolate::~ScopedV8Isolate() |
{ |
- isolate->Dispose(); |
+ auto capturedIsolatePtr = isolate; |
+ std::thread([capturedIsolatePtr] |
+ { |
+ std::chrono::seconds timeout(60 * 10); |
+ std::this_thread::sleep_for(timeout); |
+ capturedIsolatePtr->Dispose(); |
+ }).detach(); |
isolate = nullptr; |
} |