summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/src/fxjse/src/class.cpp4
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;
}
}