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

Unified Diff: src/JsError.cpp

Issue 29810573: Issue 6526 - Remove deprecated Utf8Value() usage (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created June 19, 2018, 5:11 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/JsError.h ('k') | src/JsValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsError.cpp
===================================================================
--- a/src/JsError.cpp
+++ b/src/JsError.cpp
@@ -14,28 +14,29 @@
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
#include "JsError.h"
using namespace AdblockPlus;
-JsError::JsError(const v8::Local<v8::Value>& exception,
+JsError::JsError(v8::Isolate* isolate, const v8::Local<v8::Value>& exception,
const v8::Local<v8::Message>& message)
- : std::runtime_error(ExceptionToString(exception, message))
+ : std::runtime_error(ExceptionToString(isolate, exception, message))
{
}
-std::string JsError::ExceptionToString(const v8::Local<v8::Value>& exception,
+std::string JsError::ExceptionToString(v8::Isolate* isolate,
+ const v8::Local<v8::Value>& exception,
const v8::Local<v8::Message>& message)
{
std::stringstream error;
- error << *v8::String::Utf8Value(exception);
+ error << *v8::String::Utf8Value(isolate, exception);
if (!message.IsEmpty())
{
error << " at ";
- error << *v8::String::Utf8Value(message->GetScriptResourceName());
+ error << *v8::String::Utf8Value(isolate, message->GetScriptResourceName());
error << ":";
error << message->GetLineNumber();
}
return error.str();
-}
+}
« no previous file with comments | « src/JsError.h ('k') | src/JsValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld