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: Created Jan. 27, 2015, 10:15 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
Index: src/FilterEngine.cpp
diff --git a/src/FilterEngine.cpp b/src/FilterEngine.cpp
index 96c4571fbf593f47041bd3415fc44d73f55da7f1..013d21dcd7d0c62177e80436734fdbaf3b84dd7d 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));
+ auto jsNotification = func->Call(params);
Felix Dahlke 2015/01/27 13:09:09 C++03! :)
sergei 2015/01/27 13:20:12 fixed, sorry
+ if (!jsNotification->IsObject())
+ {
+ return NotificationPtr();
+ }
+ return NotificationPtr(new Notification(jsNotification));
}
AdblockPlus::FilterPtr FilterEngine::Matches(const std::string& url,

Powered by Google App Engine
This is Rietveld