|
|
Chromium Code Reviews
DescriptionMojo C++ bindings: switch device/nfc mojom target to use STL/WTF types.
BUG=624136
TBR=rockot@chromium.org for trivial change in BUILD.gn
Committed: https://crrev.com/c5556be4af7828e8acb9eac178bed74941e1abed
Cr-Commit-Position: refs/heads/master@{#431980}
Patch Set 1 #
Total comments: 5
Messages
Total messages: 21 (12 generated)
The CQ bit was checked by yzshen@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...
Description was changed from ========== Mojo C++ bindings: switch device/nfc mojom target to use STL/WTF types. BUG=624136 ========== to ========== Mojo C++ bindings: switch device/nfc mojom target to use STL/WTF types. BUG=624136 ==========
yzshen@chromium.org changed reviewers: + haraken@chromium.org
Hi, Kentaro. Would you please take a look? Thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/nfc/NFC.cpp (left): https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/nfc/NFC.cpp:251: messagePtr->data = mojo::WTFArray<NFCRecordPtr>::From(message.data()); Why can we remove this? https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/nfc/NFC.cpp:145: record->data = mojo::WTFArray<uint8_t>::From(buffer).PassStorage(); Would you help me understand what PassStorage is doing? i.e., when do we need to use PassStorage?
Thanks, Kentaro! https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/nfc/NFC.cpp (left): https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/nfc/NFC.cpp:251: messagePtr->data = mojo::WTFArray<NFCRecordPtr>::From(message.data()); On 2016/11/12 01:35:41, haraken wrote: > > Why can we remove this? Because line 243-250 does the same thing as line 251 (except that line 243-250 doesn't allow null element). Therefore, I kept the former. https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/nfc/NFC.cpp:145: record->data = mojo::WTFArray<uint8_t>::From(buffer).PassStorage(); On 2016/11/12 01:35:41, haraken wrote: > > Would you help me understand what PassStorage is doing? i.e., when do we need to > use PassStorage? > Because with this CL, record->data's type becomes WTF::Vector<uint8_t>. In order to convert a mojo::WTFArray<uint8_t> to that, we need to use PassStorage(). You might ask: why are we still using mojo::WTFArray<> at all? That is because we have a TypeConverter defined to convert from blink::DOMArrayBuffer to WTFArray. I am a little reluctant to change that to a conversion function from blink::DOMArrayBuffer to WTF::Vector in this CL (which is supposed to be a mechanical change).
LGTM https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/2498543003/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/nfc/NFC.cpp:145: record->data = mojo::WTFArray<uint8_t>::From(buffer).PassStorage(); On 2016/11/14 17:10:42, yzshen1 wrote: > On 2016/11/12 01:35:41, haraken wrote: > > > > Would you help me understand what PassStorage is doing? i.e., when do we need > to > > use PassStorage? > > > > Because with this CL, record->data's type becomes WTF::Vector<uint8_t>. In order > to convert a mojo::WTFArray<uint8_t> to that, we need to use PassStorage(). > > You might ask: why are we still using mojo::WTFArray<> at all? That is because > we have a TypeConverter defined to convert from blink::DOMArrayBuffer to > WTFArray. I am a little reluctant to change that to a conversion function from > blink::DOMArrayBuffer to WTF::Vector in this CL (which is supposed to be a > mechanical change). Thanks, makes sense.
The CQ bit was checked by yzshen@chromium.org
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
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
Description was changed from ========== Mojo C++ bindings: switch device/nfc mojom target to use STL/WTF types. BUG=624136 ========== to ========== Mojo C++ bindings: switch device/nfc mojom target to use STL/WTF types. BUG=624136 TBR=rockot@chromium.org for trivial change in BUILD.gn ==========
The CQ bit was checked by yzshen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Mojo C++ bindings: switch device/nfc mojom target to use STL/WTF types. BUG=624136 TBR=rockot@chromium.org for trivial change in BUILD.gn ========== to ========== Mojo C++ bindings: switch device/nfc mojom target to use STL/WTF types. BUG=624136 TBR=rockot@chromium.org for trivial change in BUILD.gn ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Mojo C++ bindings: switch device/nfc mojom target to use STL/WTF types. BUG=624136 TBR=rockot@chromium.org for trivial change in BUILD.gn ========== to ========== Mojo C++ bindings: switch device/nfc mojom target to use STL/WTF types. BUG=624136 TBR=rockot@chromium.org for trivial change in BUILD.gn Committed: https://crrev.com/c5556be4af7828e8acb9eac178bed74941e1abed Cr-Commit-Position: refs/heads/master@{#431980} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/c5556be4af7828e8acb9eac178bed74941e1abed Cr-Commit-Position: refs/heads/master@{#431980} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
