Bug 836968 - Cache shapes for JSON objects and assign types to constructed JSON objects and arrays, r=waldo,jandem.
Bug 847002 - Guard against going into codepaths that assume GetLayerManager doesn't return null. r=Cwiiis
Back out d501d97c05a6 (bug 847002) because it doesn't help. r=me