diff options
author | Josh Haberman <jhaberman@gmail.com> | 2016-07-18 14:46:12 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2016-07-18 14:46:12 -0700 |
commit | 923eae8b16e4f9e7d121bc7b3084f4e717e2f166 (patch) | |
tree | d2bd4f26e38ec137f4c71d3128f050531679803a /js/message.js | |
parent | b6a620da134b174a90a26550f91c75c8e324288a (diff) | |
download | protobuf-923eae8b16e4f9e7d121bc7b3084f4e717e2f166.tar.gz protobuf-923eae8b16e4f9e7d121bc7b3084f4e717e2f166.tar.bz2 protobuf-923eae8b16e4f9e7d121bc7b3084f4e717e2f166.zip |
JavaScript maps: move binary callbacks out of constructor.
This change will help us separate binary support into
separate files, because we only refer to binary serialization
functions in the actual binary serialization paths.
Diffstat (limited to 'js/message.js')
-rw-r--r-- | js/message.js | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/js/message.js b/js/message.js index 3863bac0..e8185dee 100644 --- a/js/message.js +++ b/js/message.js @@ -747,29 +747,16 @@ jspb.Message.getFieldProto3 = function(msg, fieldNumber, defaultValue) { * of serialization/parsing callbacks (which are required by the map at * construction time, and the map may be constructed here). * - * The below callbacks are used to allow the map to serialize and parse its - * binary wire format data. Their purposes are described in more detail in - * `jspb.Map`'s constructor documentation. - * * @template K, V * @param {!jspb.Message} msg * @param {number} fieldNumber * @param {boolean|undefined} noLazyCreate * @param {?=} opt_valueCtor - * @param {function(number,K)=} opt_keyWriterFn - * @param {function():K=} opt_keyReaderFn - * @param {function(number,V)|function(number,V,?)| - * function(number,V,?,?,?,?)=} opt_valueWriterFn - * @param {function():V| - * function(V,function(?,?))=} opt_valueReaderFn - * @param {function(?,?)|function(?,?,?,?,?)=} opt_valueWriterCallback - * @param {function(?,?)=} opt_valueReaderCallback * @return {!jspb.Map<K, V>|undefined} * @protected */ jspb.Message.getMapField = function(msg, fieldNumber, noLazyCreate, - opt_valueCtor, opt_keyWriterFn, opt_keyReaderFn, opt_valueWriterFn, - opt_valueReaderFn, opt_valueWriterCallback, opt_valueReaderCallback) { + opt_valueCtor) { if (!msg.wrappers_) { msg.wrappers_ = {}; } @@ -787,10 +774,7 @@ jspb.Message.getMapField = function(msg, fieldNumber, noLazyCreate, } return msg.wrappers_[fieldNumber] = new jspb.Map( - /** @type {!Array<!Array<!Object>>} */ (arr), - opt_keyWriterFn, opt_keyReaderFn, opt_valueWriterFn, - opt_valueReaderFn, opt_valueCtor, opt_valueWriterCallback, - opt_valueReaderCallback); + /** @type {!Array<!Array<!Object>>} */ (arr), opt_valueCtor); } }; |