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

Unified Diff: fpdfsdk/src/javascript/app.cpp

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 5 years 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 | « fpdfsdk/src/javascript/PublicMethods.cpp ('k') | fpdfsdk/src/javascript/event.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/app.cpp
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index 70ce7710906084f0fd9cf74037d1b4650c82a299..0ed280740d5e2b6d2050aaaf164d72a91b13670a 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -126,7 +126,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));
}
@@ -416,9 +416,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()) {
@@ -527,8 +525,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()) {
@@ -770,10 +766,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]);
« no previous file with comments | « fpdfsdk/src/javascript/PublicMethods.cpp ('k') | fpdfsdk/src/javascript/event.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698