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

Unified Diff: src/JsEngine.cpp

Issue 29731562: Issue 6477 - separate done and error callbacks in IFileSystem::Read (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git@c0a6434596a83383e37678ef3b6ecef00ed6a261
Patch Set: Created March 23, 2018, 10:58 a.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
Index: src/JsEngine.cpp
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp
index 24a574b7faa07e774155f59be12eb5285c45c4a0..9e540a57cd07b339923772854d57a4b9289dea83 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -321,6 +321,17 @@ JsValueList JsEngine::TakeJsValues(const JsWeakValuesID& id)
return retValue;
}
+JsValueList JsEngine::GetJsValues(const JsWeakValuesID& id)
+{
+ JsValueList retValue;
+ JsContext context(*this);
+ for (const auto& v8Value : id.iterator->values)
+ {
+ retValue.emplace_back(JsValue(shared_from_this(), v8::Local<v8::Value>::New(GetIsolate(), v8Value)));
+ }
+ return retValue;
+}
+
AdblockPlus::JsValueList AdblockPlus::JsEngine::ConvertArguments(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
const JsContext context(*this);

Powered by Google App Engine
This is Rietveld