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

Unified Diff: src/Notification.cpp

Issue 29417624: Issue 5034 - Part 4: JsEngine::Evaluate() return a JsValue (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created April 19, 2017, 6:18 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
Index: src/Notification.cpp
===================================================================
--- a/src/Notification.cpp
+++ b/src/Notification.cpp
@@ -64,17 +64,17 @@
NotificationType Notification::GetType() const
{
return StringToNotificationType(GetProperty("type").AsString());
}
NotificationTexts Notification::GetTexts() const
{
- JsValue jsTexts = jsEngine->Evaluate("API.getNotificationTexts")->Call(*this);
+ JsValue jsTexts = jsEngine->Evaluate("API.getNotificationTexts").Call(*this);
NotificationTexts notificationTexts;
JsValue jsTitle = jsTexts.GetProperty("title");
if (jsTitle.IsString())
{
notificationTexts.title = jsTitle.AsString();
}
JsValue jsMessage = jsTexts.GetProperty("message");
if (jsMessage.IsString())
@@ -97,10 +97,10 @@
{
retValue.push_back(link.AsString());
}
return retValue;
}
void Notification::MarkAsShown()
{
- jsEngine->Evaluate("API.markNotificationAsShown")->Call(GetProperty("id"));
+ jsEngine->Evaluate("API.markNotificationAsShown").Call(GetProperty("id"));
}
« include/AdblockPlus/JsValue.h ('K') | « src/JsValue.cpp ('k') | test/AppInfoJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld