Bug 668760 - Factor out method to get weave engine (r=mbrubeck)

This commit is contained in:
Lucas Rocha 2011-08-23 09:16:03 -07:00
Родитель 557bef417e
Коммит 8d7a147c2f
1 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -1427,16 +1427,22 @@
<field name="scrollBoxObject">this._children.scrollBoxObject</field> <field name="scrollBoxObject">this._children.scrollBoxObject</field>
<method name="_getWeaveEngine">
<body><![CDATA[
// Return null if the Weave isn't ready
if (document.getElementById("cmd_remoteTabs").getAttribute("disabled") == "true")
return null;
if (Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED)
return null;
return Weave.Engines.get("tabs");
]]></body>
</method>
<method name="_getRemoteTabs"> <method name="_getRemoteTabs">
<body><![CDATA[ <body><![CDATA[
// Don't do anything if the Weave isn't ready
if (document.getElementById("cmd_remoteTabs").getAttribute("disabled") == "true")
return [];
if (Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED)
return [];
// Don't do anything if the tabs engine isn't ready // Don't do anything if the tabs engine isn't ready
let engine = Weave.Engines.get("tabs"); let engine = this._getWeaveEngine();
if (!engine) if (!engine)
return []; return [];