| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 function PrivateScriptController() | 7 function PrivateScriptController() |
| 8 { | 8 { |
| 9 this._installedClasses = {}; | 9 this._installedClasses = {}; |
| 10 this._DOMException = {}; | 10 this._DOMException = {}; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 var exception = new PrivateScriptException(); | 134 var exception = new PrivateScriptException(); |
| 135 exception.code = code; | 135 exception.code = code; |
| 136 exception.message = message; | 136 exception.message = message; |
| 137 exception.name = "PrivateScriptException"; | 137 exception.name = "PrivateScriptException"; |
| 138 throw exception; | 138 throw exception; |
| 139 }, | 139 }, |
| 140 } | 140 } |
| 141 | 141 |
| 142 if (typeof window.privateScriptController === 'undefined') | 142 if (!window.hasOwnProperty("privateScriptController")) |
| 143 window.privateScriptController = new PrivateScriptController(); | 143 window.privateScriptController = new PrivateScriptController(); |
| 144 | 144 |
| 145 // This line must be the last statement of this JS file. | 145 // This line must be the last statement of this JS file. |
| 146 // A parenthesis is needed, because the caller of this script (PrivateScriptRunn
er.cpp) | 146 // A parenthesis is needed, because the caller of this script (PrivateScriptRunn
er.cpp) |
| 147 // is depending on the completion value of this script. | 147 // is depending on the completion value of this script. |
| 148 (privateScriptController.installedClasses); | 148 (privateScriptController.installedClasses); |
| OLD | NEW |