Bug 986440: Test for |options.rilMessageType| in REQUEST_GET_SMSC_ADDRESS handler, r=htsai

The response handler for REQUEST_GET_SMSC_ADDRESS expects the field
|rilMessageType| to be present in its options. This is not the case
if the request was generated from within ril_worker.js.

This patch handles this case by adding an extra test for the existance
of the field. The response handler will return without sending a reply
to the content helper. This is not a problem since the content handler
did not invoke the request anyway.

--HG--
extra : rebase_source : 211d5f4dc29dd99b745bc29d856c291175f156f1
This commit is contained in:
Thomas Zimmermann 2014-03-27 10:35:17 +01:00
parent 3342e9a58d
commit 96b7107a80

View File

@ -6189,7 +6189,7 @@ RilObject.prototype[REQUEST_EXIT_EMERGENCY_CALLBACK_MODE] = function REQUEST_EXI
RilObject.prototype[REQUEST_GET_SMSC_ADDRESS] = function REQUEST_GET_SMSC_ADDRESS(length, options) {
this.SMSC = options.rilRequestError ? null : this.context.Buf.readString();
if (!options || options.rilMessageType !== "getSmscAddress") {
if (!options.rilMessageType || options.rilMessageType !== "getSmscAddress") {
return;
}