diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-03-07 14:39:29 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-03-07 14:39:29 -0500 |
commit | 18571cd4c53c72f8da72ee984c6b0a31beae6c64 (patch) | |
tree | a2527c2f8f82a55d8bdeddf04649fa4cc1a1e920 /xfa/src | |
parent | 14e20b124744c3342d3ff0a288788e991087718b (diff) | |
download | pdfium-18571cd4c53c72f8da72ee984c6b0a31beae6c64.tar.xz |
Fix linux XFA build.
This patch is from jinming_wang@foxitsoftware.com.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1770103002 .
Diffstat (limited to 'xfa/src')
-rw-r--r-- | xfa/src/fxjse/src/class.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<v8::Object> hGlobalObject = FXJSE_GetGlobalObjectFromContext(scope.GetLocalContext()); for (int32_t i = 0; i < nNum; i++) { - hGlobalObject->DefineOwnProperty( + v8::Maybe<bool> 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<FXJSE_FUNCTION*>(lpFunctions + i))), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete)); + if (!maybe_success.FromMaybe(false)) + return; } } |