summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/app.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
commit96660d6f382204339d6b1aadc3913303d436e252 (patch)
treeb5f84756e1a89251831cebc05b9d4e1f6cb2027b /fpdfsdk/src/javascript/app.cpp
parentd983b09c3ae29a97cba8e9ec9c6351545f6087ee (diff)
downloadpdfium-96660d6f382204339d6b1aadc3913303d436e252.tar.xz
Merge to XFA: Get rid of most instance of 'foo != NULL'
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 .
Diffstat (limited to 'fpdfsdk/src/javascript/app.cpp')
-rw-r--r--fpdfsdk/src/javascript/app.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index cb1cc9b592..34b51310ce 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -129,7 +129,7 @@ FX_BOOL app::activeDocs(IJS_Context* cc,
pRuntime->GetIsolate(), pRuntime, CJS_Document::g_nObjDefnID);
pJSDocument =
(CJS_Document*)FXJS_GetPrivate(pRuntime->GetIsolate(), pObj);
- ASSERT(pJSDocument != NULL);
+ ASSERT(pJSDocument);
}
aDocs.SetElement(0, CJS_Value(pRuntime, pJSDocument));
}
@@ -450,9 +450,7 @@ FX_BOOL app::setTimeOut(IJS_Context* cc,
}
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
- ASSERT(pRuntime != NULL);
CFX_WideString script = params.size() > 0 ? params[0].ToCFXWideString() : L"";
if (script.IsEmpty()) {
@@ -561,8 +559,6 @@ FX_BOOL app::execMenuItem(IJS_Context* cc,
}
void app::TimerProc(CJS_Timer* pTimer) {
- ASSERT(pTimer != NULL);
-
CJS_Runtime* pRuntime = pTimer->GetRuntime();
switch (pTimer->GetType()) {
@@ -804,10 +800,7 @@ FX_BOOL app::response(IJS_Context* cc,
}
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
-
CPDFDoc_Environment* pApp = pContext->GetReaderApp();
- ASSERT(pApp != NULL);
const int MAX_INPUT_BYTES = 2048;
nonstd::unique_ptr<char[]> pBuff(new char[MAX_INPUT_BYTES + 2]);