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

Unified Diff: src/JsError.cpp

Issue 29810583: Issue 6526 - Use new v8::Message::GetLineNumber() API (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created June 19, 2018, 5:13 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 | « no previous file | no next file » | 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
@@ -31,12 +31,16 @@
{
std::stringstream error;
error << *v8::String::Utf8Value(isolate, exception);
if (!message.IsEmpty())
{
error << " at ";
error << *v8::String::Utf8Value(isolate, message->GetScriptResourceName());
error << ":";
- error << message->GetLineNumber();
+ auto lineNumber = message->GetLineNumber(isolate->GetCurrentContext());
+ if (lineNumber.IsJust())
+ error << lineNumber.FromJust();
+ else
+ error << "<unknown>";
}
return error.str();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld