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

Unified Diff: src/Notification.cpp

Issue 29393589: Issue 5013 - Make more methods const.- introduced JsConstValuePtr and JsConstValueList- JsValue:… (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Now mostly use the single param Call() overload Created March 24, 2017, 2:10 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/JsValue.cpp ('k') | src/WebRequestJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Notification.cpp
===================================================================
--- a/src/Notification.cpp
+++ b/src/Notification.cpp
@@ -64,17 +64,17 @@ Notification::Notification(JsValue&& jsV
NotificationType Notification::GetType() const
{
return StringToNotificationType(GetProperty("type")->AsString());
}
NotificationTexts Notification::GetTexts() const
{
- JsValuePtr jsTexts = jsEngine->Evaluate("API.getNotificationTexts")->Call(*this);
+ JsValuePtr jsTexts = jsEngine->Evaluate("API.getNotificationTexts")->Call(shared_from_this());
NotificationTexts notificationTexts;
JsValuePtr jsTitle = jsTexts->GetProperty("title");
if (jsTitle->IsString())
{
notificationTexts.title = jsTitle->AsString();
}
JsValuePtr jsMessage = jsTexts->GetProperty("message");
if (jsMessage->IsString())
@@ -98,10 +98,10 @@ std::vector<std::string> Notification::G
{
retValue.push_back((*linkIterator)->AsString());
}
return retValue;
}
void Notification::MarkAsShown()
{
- jsEngine->Evaluate("API.markNotificationAsShown")->Call(*GetProperty("id"));
-}
+ jsEngine->Evaluate("API.markNotificationAsShown")->Call(GetProperty("id"));
+}
« no previous file with comments | « src/JsValue.cpp ('k') | src/WebRequestJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld