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

Unified Diff: src/Notification.cpp

Issue 29334678: Issue 3589 - Change return type of AdblockPlus::JsValue::Call from pointer to r-value object. (Closed)
Patch Set: rebase Created March 27, 2017, 9:47 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
« no previous file with comments | « src/JsValue.cpp ('k') | test/JsValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Notification.cpp
diff --git a/src/Notification.cpp b/src/Notification.cpp
index 6567777591a6bfa9ac2233cd3346a79ecaa60c2b..d5d6f9d4e27061cd0f028193015c88f932b32870 100644
--- a/src/Notification.cpp
+++ b/src/Notification.cpp
@@ -69,14 +69,14 @@ NotificationType Notification::GetType() const
NotificationTexts Notification::GetTexts() const
{
- JsValuePtr jsTexts = jsEngine->Evaluate("API.getNotificationTexts")->Call(shared_from_this());
+ JsValue jsTexts = jsEngine->Evaluate("API.getNotificationTexts")->Call(*this);
NotificationTexts notificationTexts;
- JsValuePtr jsTitle = jsTexts->GetProperty("title");
+ JsValuePtr jsTitle = jsTexts.GetProperty("title");
if (jsTitle->IsString())
{
notificationTexts.title = jsTitle->AsString();
}
- JsValuePtr jsMessage = jsTexts->GetProperty("message");
+ JsValuePtr jsMessage = jsTexts.GetProperty("message");
if (jsMessage->IsString())
{
notificationTexts.message = jsMessage->AsString();
@@ -102,5 +102,5 @@ std::vector<std::string> Notification::GetLinks() const
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') | test/JsValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld