summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-01-24 19:45:35 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-24 19:45:35 +0000
commit4ad801bdc86405888290037065de5d3a3b447167 (patch)
tree5ed4f409e868be2f293b5ab037e111e445f13748
parent701d21682af1aa3f7f449d2da9681ee01dc8990d (diff)
downloadpdfium-4ad801bdc86405888290037065de5d3a3b447167.tar.xz
Fix broken XFA builds with new V8
These two methods need to be switched to using the maybe versions, since the older versions are being deprecated. BUG=pdfium:989 Change-Id: Id2b48395353af0078e51b2d3ac42103643922320 Reviewed-on: https://pdfium-review.googlesource.com/23830 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
-rw-r--r--fxjs/cfxjse_context.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/fxjs/cfxjse_context.cpp b/fxjs/cfxjse_context.cpp
index 5c85cfd5b1..3ec3b47c14 100644
--- a/fxjs/cfxjse_context.cpp
+++ b/fxjs/cfxjse_context.cpp
@@ -69,8 +69,12 @@ v8::Local<v8::Object> CreateReturnValue(v8::Isolate* pIsolate,
hReturnValue->Set(1, hMessage->Get());
}
hReturnValue->Set(2, hException);
- hReturnValue->Set(3, v8::Integer::New(pIsolate, hMessage->GetLineNumber()));
- hReturnValue->Set(4, hMessage->GetSourceLine());
+ hReturnValue->Set(
+ 3, v8::Integer::New(
+ pIsolate, hMessage->GetLineNumber(pIsolate->GetCurrentContext())
+ .FromMaybe(0)));
+ hReturnValue->Set(4, hMessage->GetSourceLine(pIsolate->GetCurrentContext())
+ .FromMaybe(v8::Local<v8::String>()));
v8::Maybe<int32_t> maybe_int =
hMessage->GetStartColumn(pIsolate->GetCurrentContext());
hReturnValue->Set(5, v8::Integer::New(pIsolate, maybe_int.FromMaybe(0)));