summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/event.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/event.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/event.cpp')
-rw-r--r--fpdfsdk/src/javascript/event.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/fpdfsdk/src/javascript/event.cpp b/fpdfsdk/src/javascript/event.cpp
index 5ad1ca513f..2362c01287 100644
--- a/fpdfsdk/src/javascript/event.cpp
+++ b/fpdfsdk/src/javascript/event.cpp
@@ -56,10 +56,7 @@ FX_BOOL event::change(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
-
CFX_WideString& wChange = pEvent->Change();
if (vp.IsSetting()) {
if (vp.GetType() == CJS_Value::VT_string)
@@ -77,9 +74,7 @@ FX_BOOL event::changeEx(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
vp << pEvent->ChangeEx();
return TRUE;
@@ -92,9 +87,7 @@ FX_BOOL event::commitKey(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
vp << pEvent->CommitKey();
return TRUE;
@@ -104,9 +97,7 @@ FX_BOOL event::fieldFull(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (!vp.IsGetting() &&
wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0)
@@ -126,9 +117,7 @@ FX_BOOL event::keyDown(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (pEvent->KeyDown())
vp << TRUE;
@@ -144,9 +133,7 @@ FX_BOOL event::modifier(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (pEvent->Modifier())
vp << TRUE;
@@ -162,9 +149,7 @@ FX_BOOL event::name(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
vp << pEvent->Name();
return TRUE;
@@ -172,9 +157,7 @@ FX_BOOL event::name(IJS_Context* cc,
FX_BOOL event::rc(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
FX_BOOL& bRc = pEvent->Rc();
if (vp.IsSetting()) {
@@ -222,9 +205,7 @@ FX_BOOL event::selEnd(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0) {
return TRUE;
@@ -243,9 +224,7 @@ FX_BOOL event::selStart(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0) {
return TRUE;
@@ -266,9 +245,7 @@ FX_BOOL event::shift(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (pEvent->Shift())
vp << TRUE;
@@ -284,9 +261,7 @@ FX_BOOL event::source(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
vp << pEvent->Source()->GetJSObject();
return TRUE;
@@ -299,9 +274,7 @@ FX_BOOL event::target(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
vp << pEvent->Target_Field()->GetJSObject();
return TRUE;
@@ -314,9 +287,7 @@ FX_BOOL event::targetName(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
vp << pEvent->TargetName();
return TRUE;
@@ -329,9 +300,7 @@ FX_BOOL event::type(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
vp << pEvent->Type();
return TRUE;
@@ -341,9 +310,7 @@ FX_BOOL event::value(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (wcscmp((const wchar_t*)pEvent->Type(), L"Field") != 0)
return FALSE;
@@ -365,9 +332,7 @@ FX_BOOL event::willCommit(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
- ASSERT(pEvent != NULL);
if (pEvent->WillCommit())
vp << TRUE;