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 GetNotificationTexts into Notification class Created Jan. 21, 2015, 3:54 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 | « src/JsEngine.cpp ('k') | src/Notification.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/JsEngine.cpp ('k') | src/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld