| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 * @param {!Function} constructorFunction | 567 * @param {!Function} constructorFunction |
| 568 * @return {!Object} | 568 * @return {!Object} |
| 569 */ | 569 */ |
| 570 sharedInstance(constructorFunction) { | 570 sharedInstance(constructorFunction) { |
| 571 if (Runtime._instanceSymbol in constructorFunction) | 571 if (Runtime._instanceSymbol in constructorFunction) |
| 572 return constructorFunction[Runtime._instanceSymbol]; | 572 return constructorFunction[Runtime._instanceSymbol]; |
| 573 var instance = new constructorFunction(); | 573 var instance = new constructorFunction(); |
| 574 constructorFunction[Runtime._instanceSymbol] = instance; | 574 constructorFunction[Runtime._instanceSymbol] = instance; |
| 575 return instance; | 575 return instance; |
| 576 } | 576 } |
| 577 } | 577 }; |
| 578 | |
| 579 ; | |
| 580 | |
| 581 | 578 |
| 582 /** | 579 /** |
| 583 * @type {!Object.<string, string>} | 580 * @type {!Object.<string, string>} |
| 584 */ | 581 */ |
| 585 Runtime._queryParamsObject = { | 582 Runtime._queryParamsObject = { |
| 586 __proto__: null | 583 __proto__: null |
| 587 }; | 584 }; |
| 588 | 585 |
| 589 Runtime._instanceSymbol = Symbol('instance'); | 586 Runtime._instanceSymbol = Symbol('instance'); |
| 590 Runtime._extensionSymbol = Symbol('extension'); | 587 Runtime._extensionSymbol = Symbol('extension'); |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 send(message) {}, | 1122 send(message) {}, |
| 1126 | 1123 |
| 1127 /** | 1124 /** |
| 1128 * @return {!Promise<boolean>} | 1125 * @return {!Promise<boolean>} |
| 1129 */ | 1126 */ |
| 1130 close() {} | 1127 close() {} |
| 1131 }; | 1128 }; |
| 1132 | 1129 |
| 1133 /** @type {!Runtime} */ | 1130 /** @type {!Runtime} */ |
| 1134 var runtime; | 1131 var runtime; |
| OLD | NEW |