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 .
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index 094f3e7..c2e15fb 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -1096,9 +1096,7 @@
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (params.size() < 2)
return FALSE;
@@ -1217,9 +1215,7 @@
CFX_WideString& sError) {
#if _FX_OS_ != _FX_ANDROID_
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (params.size() != 2) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
@@ -1319,9 +1315,7 @@
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (params.size() != 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
@@ -1436,9 +1430,7 @@
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (params.size() != 1) {
sError = L"AFDate_KeystrokeEx's parameters' size r not correct";
@@ -1609,7 +1601,6 @@
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
if (params.size() != 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
@@ -1620,8 +1611,6 @@
int iIndex = params[0].ToInt();
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
-
if (!pEvent->m_pValue)
return FALSE;
CFX_WideString& Value = pEvent->Value();
@@ -1661,11 +1650,8 @@
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
-
if (params.size() < 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
return FALSE;
@@ -1805,9 +1791,7 @@
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEventHandler = pContext->GetEventHandler();
- ASSERT(pEventHandler != NULL);
if (params.size() != 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
@@ -1847,7 +1831,7 @@
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
+ ASSERT(pContext);
if (params.size() != 2) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
@@ -1878,7 +1862,7 @@
CFX_WideString& sError) {
if (params.size() != 3) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
+ ASSERT(pContext);
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
return FALSE;
@@ -1895,7 +1879,7 @@
CFX_WideString& sError) {
if (params.size() != 1) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
+ ASSERT(pContext);
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
return FALSE;
@@ -2011,9 +1995,7 @@
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (params.size() != 4) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);