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

Unified Diff: src/FilterEngine.cpp

Issue 4904655779790848: Issue 1107.update1 - read Notification properties (title, message and type) on the fly (Closed)
Patch Set: fix style Created Jan. 27, 2015, 1: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
« no previous file with comments | « include/AdblockPlus/Notification.h ('k') | src/Notification.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/FilterEngine.cpp
diff --git a/src/FilterEngine.cpp b/src/FilterEngine.cpp
index 96c4571fbf593f47041bd3415fc44d73f55da7f1..9448abeb10adf2a4856dcbd0dcb701c96dc5d47a 100644
--- a/src/FilterEngine.cpp
+++ b/src/FilterEngine.cpp
@@ -265,7 +265,12 @@ NotificationPtr FilterEngine::GetNextNotificationToShow(const std::string& url)
{
params.push_back(jsEngine->NewValue(url));
}
- return Notification::JsValueToNotification(func->Call(params));
+ JsValuePtr jsNotification = func->Call(params);
+ if (!jsNotification->IsObject())
+ {
+ return NotificationPtr();
+ }
+ return NotificationPtr(new Notification(jsNotification));
}
AdblockPlus::FilterPtr FilterEngine::Matches(const std::string& url,
« no previous file with comments | « include/AdblockPlus/Notification.h ('k') | src/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld