Fix javascript provider handling.

@bug W-2217132@

@rev byao@
Merging origin/goliver/master-pending-js-providers into master