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

Unified Diff: src/JsValue.cpp

Issue 29334678: Issue 3589 - Change return type of AdblockPlus::JsValue::Call from pointer to r-value object. (Closed)
Patch Set: Created Jan. 27, 2016, 11:17 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/JsValue.cpp
diff --git a/src/JsValue.cpp b/src/JsValue.cpp
index 1bc74903758f1911259d99c1dc48b16942fe6bcd..7519cf06e71a83b95fdd6055e86dd792f00d2b5b 100644
--- a/src/JsValue.cpp
+++ b/src/JsValue.cpp
@@ -205,7 +205,7 @@ std::string AdblockPlus::JsValue::GetClass() const
return Utils::FromV8String(obj->GetConstructorName());
}
-AdblockPlus::JsValuePtr AdblockPlus::JsValue::Call(const JsValueList& params, JsValuePtr thisPtr) const
+AdblockPlus::JsValue AdblockPlus::JsValue::Call(const JsValueList& params, JsValuePtr thisPtr) const
{
if (!IsFunction())
throw new std::runtime_error("Attempting to call a non-function");
@@ -233,5 +233,5 @@ AdblockPlus::JsValuePtr AdblockPlus::JsValue::Call(const JsValueList& params, Js
if (tryCatch.HasCaught())
throw JsError(tryCatch.Exception(), tryCatch.Message());
- return JsValuePtr(new JsValue(jsEngine, result));
+ return JsValue(jsEngine, result);
}
« src/FilterEngine.cpp ('K') | « src/FilterEngine.cpp ('k') | src/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld