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

Unified Diff: src/JsValue.cpp

Issue 29418610: Noissue - Create context in ~JsValue() before disposing value (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created April 20, 2017, 12:45 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/JsValue.cpp
===================================================================
--- a/src/JsValue.cpp
+++ b/src/JsValue.cpp
@@ -43,16 +43,17 @@
const JsContext context(src.jsEngine);
value.reset(new v8::Persistent<v8::Value>(src.jsEngine->GetIsolate(), *src.value));
}
AdblockPlus::JsValue::~JsValue()
{
if (value)
{
+ const JsContext context(jsEngine);
value->Dispose();
value.reset();
}
}
JsValue& AdblockPlus::JsValue::operator=(const JsValue& src)
{
const JsContext context(src.jsEngine);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld