From 18571cd4c53c72f8da72ee984c6b0a31beae6c64 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 7 Mar 2016 14:39:29 -0500 Subject: Fix linux XFA build. This patch is from jinming_wang@foxitsoftware.com. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1770103002 . --- xfa/src/fxjse/src/class.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xfa/src') diff --git a/xfa/src/fxjse/src/class.cpp b/xfa/src/fxjse/src/class.cpp index 206ad05734..57e513cc30 100644 --- a/xfa/src/fxjse/src/class.cpp +++ b/xfa/src/fxjse/src/class.cpp @@ -33,7 +33,7 @@ void FXJSE_DefineFunctions(FXJSE_HCONTEXT hContext, v8::Local hGlobalObject = FXJSE_GetGlobalObjectFromContext(scope.GetLocalContext()); for (int32_t i = 0; i < nNum; i++) { - hGlobalObject->DefineOwnProperty( + v8::Maybe maybe_success = hGlobalObject->DefineOwnProperty( scope.GetLocalContext(), v8::String::NewFromUtf8(pIsolate, lpFunctions[i].name), v8::Function::New( @@ -41,6 +41,8 @@ void FXJSE_DefineFunctions(FXJSE_HCONTEXT hContext, v8::External::New(pIsolate, const_cast(lpFunctions + i))), static_cast(v8::ReadOnly | v8::DontDelete)); + if (!maybe_success.FromMaybe(false)) + return; } } -- cgit v1.2.3