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

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

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: 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
Index: fpdfsdk/src/javascript/global.cpp
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index 2d9799dd4e1ae54fb1265755a5fdf7b7973f9a4e..7a43b677e91094a8d939d5c4f9357fbc765e1a27 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -227,12 +227,8 @@ FX_BOOL JSGlobalAlternate::setPersistent(IJS_Context* cc,
}
void JSGlobalAlternate::UpdateGlobalPersistentVariables() {
- ASSERT(m_pGlobalData != NULL);
-
for (int i = 0, sz = m_pGlobalData->GetSize(); i < sz; i++) {
CJS_GlobalData_Element* pData = m_pGlobalData->GetAt(i);
- ASSERT(pData != NULL);
-
switch (pData->data.nType) {
case JS_GLOBALDATA_TYPE_NUMBER:
SetGlobalVariables(pData->data.sKey, JS_GLOBALDATA_TYPE_NUMBER,
@@ -380,12 +376,8 @@ void JSGlobalAlternate::ObjectToArray(IJS_Context* cc,
void JSGlobalAlternate::PutObjectProperty(v8::Local<v8::Object> pObj,
CJS_KeyValue* pData) {
- ASSERT(pData != NULL);
-
for (int i = 0, sz = pData->objData.Count(); i < sz; i++) {
CJS_KeyValue* pObjData = pData->objData.GetAt(i);
- ASSERT(pObjData != NULL);
-
switch (pObjData->nType) {
case JS_GLOBALDATA_TYPE_NUMBER:
FXJS_PutObjectNumber(NULL, pObj, pObjData->sKey.UTF8Decode().c_str(),

Powered by Google App Engine
This is Rietveld 408576698