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

Unified Diff: src/Notification.cpp

Issue 5598762307158016: Issue 1550 - Get rid of V8ValueHolder.h (Closed)
Patch Set: rebase Created Aug. 3, 2015, 8:28 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') | no next file » | 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 d7514889f260caab664503cdf176d111532e896a..b8c1a8d203167f0a5a3773b0e13379ac270ac75b 100644
--- a/src/Notification.cpp
+++ b/src/Notification.cpp
@@ -57,8 +57,8 @@ namespace
}
}
-Notification::Notification(const JsValuePtr& jsValue)
- : JsValue(jsValue)
+Notification::Notification(JsValue&& jsValue)
+ : JsValue(std::move(jsValue))
{
}
@@ -101,14 +101,14 @@ void Notification::MarkAsShown()
jsEngine->Evaluate("API.markNotificationAsShown")->Call(params);
}
-NotificationPtr Notification::JsValueToNotification(const JsValuePtr& jsValue)
+NotificationPtr Notification::JsValueToNotification(JsValue&& jsValue)
{
- if (!jsValue || !jsValue->IsObject())
+ if (!jsValue.IsObject())
{
return NotificationPtr();
}
- NotificationPtr notification(new Notification(jsValue));
+ NotificationPtr notification(new Notification(std::move(jsValue)));
JsValuePtr jsType = notification->GetProperty("type");
notification->type = StringToNotificationType(jsType ? jsType->AsString() : "");
« no previous file with comments | « src/JsValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld