|
|
Created:
3 years, 11 months ago by Sam McNally Modified:
3 years, 11 months ago CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, cc-bugs_chromium.org, darin (slow to review), chrome-apps-syd-reviews_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionRemove internal uses of mojo::Array and mojo::WTFArray.
This changes the following to use std::vector/WTF::Vector instead of the
wrapper types:
- Struct::Serialize()/Deserialize()
- Internal storage of NativeStruct
BUG=674766
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
Review-Url: https://codereview.chromium.org/2604953003
Cr-Commit-Position: refs/heads/master@{#442436}
Committed: https://chromium.googlesource.com/chromium/src/+/fd1748672f6e2f79693dc01bb868c8bf9edaa035
Patch Set 1 : #
Total comments: 6
Patch Set 2 : rebase #Patch Set 3 : #Patch Set 4 : rebase #Patch Set 5 : rebase #Dependent Patchsets: Messages
Total messages: 58 (47 generated)
Description was changed from ========== Remove internal uses and ArrayTraits for mojo::Array and mojo::WTFArray. This changes the following uses to use std::vector/WTF::Vector instead of the wrapper types: - Struct::Serialize()/Deserialize() - Internal storage of NativeStruct BUG=674766 ========== to ========== Remove internal uses and ArrayTraits for mojo::Array and mojo::WTFArray. This changes the following uses to use std::vector/WTF::Vector instead of the wrapper types: - Struct::Serialize()/Deserialize() - Internal storage of NativeStruct BUG=674766 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Remove internal uses and ArrayTraits for mojo::Array and mojo::WTFArray. This changes the following uses to use std::vector/WTF::Vector instead of the wrapper types: - Struct::Serialize()/Deserialize() - Internal storage of NativeStruct BUG=674766 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Remove internal uses of mojo::Array and mojo::WTFArray. This changes the following to use std::vector/WTF::Vector instead of the wrapper types: - Struct::Serialize()/Deserialize() - Internal storage of NativeStruct BUG=674766 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
Description was changed from ========== Remove internal uses of mojo::Array and mojo::WTFArray. This changes the following to use std::vector/WTF::Vector instead of the wrapper types: - Struct::Serialize()/Deserialize() - Internal storage of NativeStruct BUG=674766 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Remove internal uses of mojo::Array and mojo::WTFArray. This changes the following to use std::vector/WTF::Vector instead of the wrapper types: - Struct::Serialize()/Deserialize() - Internal storage of NativeStruct BUG=674766 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #1 (id:1) has been deleted
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #1 (id:20001) has been deleted
Patchset #1 (id:40001) has been deleted
Patchset #1 (id:60001) has been deleted
Patchset #1 (id:80001) has been deleted
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #1 (id:100001) has been deleted
sammc@chromium.org changed reviewers: + yzshen@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... File mojo/public/cpp/bindings/lib/hash_util.h (right): https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... mojo/public/cpp/bindings/lib/hash_util.h:67: struct HashTraits<base::Optional<std::vector<T>>, false> { Does it make sense to make this a template with template parameter base::Optional<T>? https://codereview.chromium.org/2604953003/diff/120001/mojo/public/tools/bind... File mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl (right): https://codereview.chromium.org/2604953003/diff/120001/mojo/public/tools/bind... mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl:53: {%- set serialization_result_type = "Vector<uint8_t>" Please use WTF::Vector here to be more explicit. This template file is not located in wtf/ so readers may not realize that.
https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... File mojo/public/cpp/bindings/lib/hash_util.h (right): https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... mojo/public/cpp/bindings/lib/hash_util.h:67: struct HashTraits<base::Optional<std::vector<T>>, false> { On 2017/01/03 19:26:26, yzshen1 wrote: > Does it make sense to make this a template with template parameter > base::Optional<T>? I thought about that, but it seemed nicer to use std::hash except where we need something different. https://codereview.chromium.org/2604953003/diff/120001/mojo/public/tools/bind... File mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl (right): https://codereview.chromium.org/2604953003/diff/120001/mojo/public/tools/bind... mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl:53: {%- set serialization_result_type = "Vector<uint8_t>" On 2017/01/03 19:26:26, yzshen1 wrote: > Please use WTF::Vector here to be more explicit. This template file is not > located in wtf/ so readers may not realize that. Done.
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... File mojo/public/cpp/bindings/lib/hash_util.h (right): https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... mojo/public/cpp/bindings/lib/hash_util.h:67: struct HashTraits<base::Optional<std::vector<T>>, false> { On 2017/01/03 23:52:04, Sam McNally wrote: > On 2017/01/03 19:26:26, yzshen1 wrote: > > Does it make sense to make this a template with template parameter > > base::Optional<T>? > > I thought about that, but it seemed nicer to use std::hash except where we need > something different. There might be reasons that I have forgotten: why do we I haven't understood your idea: why having a HashTraits<base::Optional<T>> definition will drive people away from std::hash? Would you please explain?
On 2017/01/04 18:05:48, yzshen1 wrote: > https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... > File mojo/public/cpp/bindings/lib/hash_util.h (right): > > https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... > mojo/public/cpp/bindings/lib/hash_util.h:67: struct > HashTraits<base::Optional<std::vector<T>>, false> { > On 2017/01/03 23:52:04, Sam McNally wrote: > > On 2017/01/03 19:26:26, yzshen1 wrote: > > > Does it make sense to make this a template with template parameter > > > base::Optional<T>? > > > > I thought about that, but it seemed nicer to use std::hash except where we > need > > something different. > > There might be reasons that I have forgotten: why do we ^^ Please ignore this line.
https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... File mojo/public/cpp/bindings/lib/hash_util.h (right): https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... mojo/public/cpp/bindings/lib/hash_util.h:67: struct HashTraits<base::Optional<std::vector<T>>, false> { On 2017/01/04 18:05:48, yzshen1 wrote: > On 2017/01/03 23:52:04, Sam McNally wrote: > > On 2017/01/03 19:26:26, yzshen1 wrote: > > > Does it make sense to make this a template with template parameter > > > base::Optional<T>? > > > > I thought about that, but it seemed nicer to use std::hash except where we > need > > something different. > > There might be reasons that I have forgotten: why do we > > I haven't understood your idea: why having a HashTraits<base::Optional<T>> > definition will drive people away from std::hash? Would you please explain? I mostly wanted to avoid the redundancy of HashTraits<base::Optional<T>> when HashTraits<T, false> would suffice by using std::hash<T> (where T = base::Optional<U>).
On 2017/01/04 22:58:35, Sam McNally wrote: > https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... > File mojo/public/cpp/bindings/lib/hash_util.h (right): > > https://codereview.chromium.org/2604953003/diff/120001/mojo/public/cpp/bindin... > mojo/public/cpp/bindings/lib/hash_util.h:67: struct > HashTraits<base::Optional<std::vector<T>>, false> { > On 2017/01/04 18:05:48, yzshen1 wrote: > > On 2017/01/03 23:52:04, Sam McNally wrote: > > > On 2017/01/03 19:26:26, yzshen1 wrote: > > > > Does it make sense to make this a template with template parameter > > > > base::Optional<T>? > > > > > > I thought about that, but it seemed nicer to use std::hash except where we > > need > > > something different. > > > > There might be reasons that I have forgotten: why do we > > > > I haven't understood your idea: why having a HashTraits<base::Optional<T>> > > definition will drive people away from std::hash? Would you please explain? > > I mostly wanted to avoid the redundancy of HashTraits<base::Optional<T>> when > HashTraits<T, false> would suffice by using std::hash<T> (where T = > base::Optional<U>). Okay. LGTM
sammc@chromium.org changed reviewers: + enne@chromium.org
+enne for //cc/ipc/cc_serialization_perftest.cc
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
cc lgtm, sorry for delay
The CQ bit was checked by sammc@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yzshen@chromium.org Link to the patchset: https://codereview.chromium.org/2604953003/#ps200001 (title: "rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 200001, "attempt_start_ts": 1484000484866980, "parent_rev": "7fb81a816c0395557905a28a635088206de4679a", "commit_rev": "fd1748672f6e2f79693dc01bb868c8bf9edaa035"}
Message was sent while issue was closed.
Description was changed from ========== Remove internal uses of mojo::Array and mojo::WTFArray. This changes the following to use std::vector/WTF::Vector instead of the wrapper types: - Struct::Serialize()/Deserialize() - Internal storage of NativeStruct BUG=674766 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Remove internal uses of mojo::Array and mojo::WTFArray. This changes the following to use std::vector/WTF::Vector instead of the wrapper types: - Struct::Serialize()/Deserialize() - Internal storage of NativeStruct BUG=674766 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2604953003 Cr-Commit-Position: refs/heads/master@{#442436} Committed: https://chromium.googlesource.com/chromium/src/+/fd1748672f6e2f79693dc01bb868... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:200001) as https://chromium.googlesource.com/chromium/src/+/fd1748672f6e2f79693dc01bb868... |