Closed Bug 837716 Opened 11 years ago Closed 11 years ago

We need that SmsDatabaseService is available without RIL

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: julienw, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [c=automation p= s=2013.11.22 u=])

Right now SmsDatabaseService is compiled only when we ask for RIL.

However it seems that we do nothing related to RIL in this file and we could promote it as the fallback implementation.

This is needed in Bug 806598 so that we can preload the database to do performance measurement.
Gene, Vicamo, do you have anybody in your team that could work on this? it's not blocking but it would be super helpful for our performance frameworks.
(In reply to Julien Wajsberg [:julienw] from comment #0)
> However it seems that we do nothing related to RIL in this file and we could
> promote it as the fallback implementation.

Why's that possible? In the MobileMessageDatabaseService.js, we need to use RIL to get some ICC info to know the owner's identity. For example,

  let iccInfo = this.mRIL.rilContext.iccInfo;
  let receiver = iccInfo ? iccInfo.msisdn : null;
(In reply to Gregor Wagner [:gwagner] from comment #1)
> Gene, Vicamo, do you have anybody in your team that could work
> on this? it's not blocking but it would be super helpful for our
> performance frameworks.

Like Gene says, different platform might have different backends. We have to config right now: --enable-websms and --enable-b2g-ril.  On what platform do you want to enable SMS db tests?  Enabling a test on a platform that doesn't supports SMS at all makes no sense, doesn't it?
(In reply to Julien Wajsberg [:julienw] from comment #0)
> Right now SmsDatabaseService is compiled only when we ask
> for RIL. However it seems that we do nothing related to RIL in
> this file and we could promote it as the fallback
> implementation.

We can promote it as default implementation for WebSMS and remove "fallback", which is actually planned.
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #4)
> (In reply to Julien Wajsberg [:julienw] from comment #0)
> > Right now SmsDatabaseService is compiled only when we ask
> > for RIL. However it seems that we do nothing related to
> > RIL in this file and we could promote it as the fallback
> > implementation.
> 
> We can promote it as default implementation for WebSMS and
> remove "fallback", which is actually planned.

Second thought, "default" implementation is still strange for me, we have another platform that shares RIL SmsDatabaseService. Why can't you build B2G RIL and test its SmsDatabaseService?
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #5)
> we have another platform that shares RIL SmsDatabaseService.

Correct: we have no ...
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #4)
> (In reply to Julien Wajsberg [:julienw] from comment #0)
> > Right now SmsDatabaseService is compiled only when we ask
> > for RIL. However it seems that we do nothing related to RIL in
> > this file and we could promote it as the fallback
> > implementation.
> 
> We can promote it as default implementation for WebSMS and remove
> "fallback", which is actually planned.

What do you mean?
I'd like to have a database automatically populated at build time, in the gaia makefile. But Gaia only uses a "standard" xulrunner that doesn't have this.

I'm completely sure I overlooked things (like what Gene said in comment 2) and there may be a better solution :) I'm relying to you on this.

Right now, in another bug that I can't find, we're considering pushing prefilled DB for tests instead.
(In reply to Mounir Lamouri (:mounir) from comment #7)
> (In reply to Vicamo Yang [:vicamo][:vyang] from comment #4)
> > We can promote it as default implementation for WebSMS and
> > remove "fallback", which is actually planned.
> 
> What do you mean?

I mean, we don't really need a "fallback" backend. It does nothing and actually no mozSmsManager will ever be created because it returns false in SmsService::hasSupport().  So why not just guarding all SMS DOM code with MOZ_WEBSMS_BACKEND?
(In reply to Julien Wajsberg [:julienw] from comment #8)
> I'd like to have a database automatically populated at build
> time, in the gaia makefile. But Gaia only uses a "standard"
> xulrunner that doesn't have this.

But should "standard" xulrunner have this just for testing B2G Gaia? That's my problem. Other problems like Gene said can be worked around. Can we inject something into a "standard" xulrunner build at will? Is that the right thing to do?
Keywords: perf
Whiteboard: [FFOS_perf_measurement] → [FFOS_perf_measurement] c=
Whiteboard: [FFOS_perf_measurement] c= → [c=instrumentation p=]
Whiteboard: [c=instrumentation p=] → [c=automation p= s= u=]
I'm closing this bug because we just won't install RIL modules on platforms without RIL functions (see bug 920551).  For SMS reference work load, please see discussions in bug 930839, which is a successor to bug 806598.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Whiteboard: [c=automation p= s= u=] → [c=automation p= s=2013.11.22 u=]
You need to log in before you can comment on or make changes to this bug.