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

Unified Diff: src/JsEngine.cpp

Issue 29396582: Issue 5039 - add support of nullable non-object values in settings
Patch Set: add proper support of nullable setting values Created March 28, 2017, 2: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
« lib/prefs.js ('K') | « src/FilterEngine.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsEngine.cpp
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp
index 1039aa3fb36795b101ca266310cc04a8efba4acf..d77b4ac9b0cdc391925605fbbed8e083a63248ff 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -227,6 +227,12 @@ AdblockPlus::JsValuePtr AdblockPlus::JsEngine::NewObject()
return JsValuePtr(new JsValue(shared_from_this(), v8::Object::New()));
}
+JsValuePtr JsEngine::NullValue()
+{
+ const JsContext context(shared_from_this());
+ return JsValuePtr(new JsValue(shared_from_this(), v8::Null()));
+}
+
AdblockPlus::JsValuePtr AdblockPlus::JsEngine::NewCallback(
v8::InvocationCallback callback)
{
« lib/prefs.js ('K') | « src/FilterEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld