| 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 var createClassWrapper = requireNative('utils').createClassWrapper; | 5 var createClassWrapper = requireNative('utils').createClassWrapper; |
| 6 var nativeDeepCopy = requireNative('utils').deepCopy; |
| 6 var schemaRegistry = requireNative('schema_registry'); | 7 var schemaRegistry = requireNative('schema_registry'); |
| 7 var CHECK = requireNative('logging').CHECK; | 8 var CHECK = requireNative('logging').CHECK; |
| 8 var WARNING = requireNative('logging').WARNING; | 9 var WARNING = requireNative('logging').WARNING; |
| 9 | 10 |
| 10 /** | 11 /** |
| 11 * An object forEach. Calls |f| with each (key, value) pair of |obj|, using | 12 * An object forEach. Calls |f| with each (key, value) pair of |obj|, using |
| 12 * |self| as the target. | 13 * |self| as the target. |
| 13 * @param {Object} obj The object to iterate over. | 14 * @param {Object} obj The object to iterate over. |
| 14 * @param {function} f The function to call in each iteration. | 15 * @param {function} f The function to call in each iteration. |
| 15 * @param {Object} self The object to use as |this| in each function call. | 16 * @param {Object} self The object to use as |this| in each function call. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 get: function() { | 118 get: function() { |
| 118 return privates(this).impl[readonly]; | 119 return privates(this).impl[readonly]; |
| 119 }, | 120 }, |
| 120 }); | 121 }); |
| 121 }); | 122 }); |
| 122 } | 123 } |
| 123 | 124 |
| 124 return publicClass; | 125 return publicClass; |
| 125 } | 126 } |
| 126 | 127 |
| 128 /** |
| 129 * Returns a deep copy of |value|. The copy will have no references to nested |
| 130 * values of |value|. |
| 131 */ |
| 132 function deepCopy(value) { |
| 133 return nativeDeepCopy(value); |
| 134 } |
| 135 |
| 127 exports.forEach = forEach; | 136 exports.forEach = forEach; |
| 128 exports.loadTypeSchema = loadTypeSchema; | 137 exports.loadTypeSchema = loadTypeSchema; |
| 129 exports.lookup = lookup; | 138 exports.lookup = lookup; |
| 130 exports.expose = expose; | 139 exports.expose = expose; |
| 140 exports.deepCopy = deepCopy; |
| OLD | NEW |