Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: xfa/src/fxjse/src/class.cpp

Issue 1769833002: Remove deprecated declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
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: xfa/src/fxjse/src/class.cpp
diff --git a/xfa/src/fxjse/src/class.cpp b/xfa/src/fxjse/src/class.cpp
index 206ad0573429e0086b3ffc8076ff70b76ffa9bac..57e513cc303300b2032356cac829006d6b559855 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;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698