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

Unified Diff: src/JsValue.cpp

Issue 5797488346791936: Issue 1107 - Support notifications (Closed)
Patch Set: move MarkAsShown into Notification class and get rid of locale arg in Notification::GetTexts Created Jan. 22, 2015, 10:02 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/JsValue.cpp
diff --git a/src/JsValue.cpp b/src/JsValue.cpp
index e3353a389d53ec2073df9c2e9f4310cb5d4b5ebb..fc3712c62bddc9bdd5f5eb722532ea484e9f2d4a 100644
--- a/src/JsValue.cpp
+++ b/src/JsValue.cpp
@@ -184,6 +184,13 @@ void AdblockPlus::JsValue::SetProperty(const std::string& name, const JsValuePtr
SetProperty(name, val->UnwrapValue());
}
+void AdblockPlus::JsValue::Push(const JsValuePtr& value)
+{
+ const JsContext context(jsEngine);
+ auto jsArray = v8::Local<v8::Array>::Cast(UnwrapValue());
+ jsArray->Set(jsArray->Length(), value->UnwrapValue());
+}
+
void AdblockPlus::JsValue::SetProperty(const std::string& name, bool val)
{
const JsContext context(jsEngine);

Powered by Google App Engine
This is Rietveld