Check-in [c4916c27cd]
Overview
SHA1:c4916c27cd507a421d69c787c89be95212807fc1
Date: 2016-02-19 17:50:11
User: rkeene
Comment:ChromeOS: Slightly better PCSC-NaCl initialization and enabled debugging in all projects
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-19
17:50
[5acacab000] ChromeOS: Fix a potential free(NULL) in initialization of PCSC-NaCl (user: rkeene, tags: trunk)
17:50
[c4916c27cd] ChromeOS: Slightly better PCSC-NaCl initialization and enabled debugging in all projects (user: rkeene, tags: trunk)
14:29
[a779f950ca] ChromeOS: Ignore debugging binaries (user: rkeene, tags: trunk)
Changes

Modified build/chrome/build-deps from [2732a78124] to [dd6eb9c6ce].

   255    255   		for file in logging.h scard_structs_serialization.h dom_requests_manager.h thread_safe_string_pool.h \
   256    256   		    pp_var_utils.cc pp_var_utils.h scard_structs_serialization.cc dom_requests_manager.cc logging.cc; do
   257    257   			find . -type f -name "${file}" -exec cp '{}' third_party/pcsc-lite/client-side/ ';'
   258    258   		done
   259    259   
   260    260   		## Create Makefile
   261    261   		cat << \_EOF_ > third_party/pcsc-lite/client-side/Makefile || exit 1
   262         -CFLAGS   += -Wall -std=gnu++11
   263         -CXXFLAGS += -Wall -std=gnu++11
          262  +CFLAGS   += -Wall -std=gnu++11 -g3 -ggdb3
          263  +CXXFLAGS += -Wall -std=gnu++11 -g3 -ggdb3
   264    264   CPPFLAGS += -I../src/src/PCSC
   265    265   
   266    266   OBJS = pcsc_nacl.o pcsc_nacl_global.o scard_structs_serialization.o pp_var_utils.o logging.o dom_requests_manager.o pcsc_nacl_init.o
   267    267   
   268    268   all: libpcsc.a
   269    269   
   270    270   libpcsc.a: $(OBJS)
................................................................................
   320    320   		smartcardManagerAppId = "khpfeaanjngmcnplbdlpegiifgpfgdco";
   321    321   	}
   322    322   
   323    323   	if (clientId == NULL) {
   324    324   		clientId = "UNKNOWN";
   325    325   	}
   326    326   
   327         -	drmDelegateImpl = new DomRequestsManager::PpDelegateImpl(instance, core);
   328         -
   329         -	pcscNaClDRM = new DomRequestsManager("pcsc-nacl", drmDelegateImpl);
          327  +	if (pcscNaClDRM == NULL) {
          328  +		drmDelegateImpl = new DomRequestsManager::PpDelegateImpl(instance, core);
          329  +	
          330  +		pcscNaClDRM = new DomRequestsManager("pcsc-nacl", drmDelegateImpl);
          331  +	}
   330    332   
   331    333   	pcsc_nacl = new PcscNacl(pcscNaClDRM, smartcardManagerAppId, clientId);
   332    334   
   333    335   	if (!pcsc_nacl->Initialize()) {
   334    336   		return;
   335    337   	}
   336    338   
................................................................................
   367    369   	buildPCSC || return 1
   368    370   
   369    371   	(
   370    372   		cd ../.. || exit 1
   371    373   
   372    374   		make distclean
   373    375   
   374         -		./configure --host=nacl --with-pcsc-headers="${instdir}/include/PCSC" --with-pcsc-libs="-lpcsc" cackey_cv_pcsc_works=okay --disable-dod-certs || exit 1
          376  +		./configure --host=nacl --with-pcsc-headers="${instdir}/include/PCSC" --with-pcsc-libs="-lpcsc" cackey_cv_pcsc_works=okay --disable-dod-certs CFLAGS='-g3 -ggdb3 -Wall' || exit 1
   375    377   		make || exit 1
   376    378   	) || return 1
   377    379   
   378    380   	mkdir -p "${instdir}/lib"
   379    381   	cp ../../libcackey.a ../../libcackey_g.a "${instdir}/lib" || return 1
   380    382   
   381    383   	return 0