Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Issue 443693002: [NaCl SDK] nacl_io: Remove use of new/delete for data buffers. (Closed)

Created:
6 years, 4 months ago by Sam Clegg
Modified:
6 years, 4 months ago
Reviewers:
binji
CC:
chromium-reviews, binji+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

[NaCl SDK] nacl_io: Remove use of new/delete for data buffers. This is the first step in the transition of nacl_io from C++ to C. Also, remove an unused method (Packet::Take). BUG=400779 R=binji@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288314

Patch Set 1 #

Patch Set 2 : #

Total comments: 10

Patch Set 3 : #

Total comments: 6

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 1

Patch Set 7 : #

Patch Set 8 : remove one more use of std::vector<char> #

Patch Set 9 : remove more use of new/delete #

Total comments: 4

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -65 lines) Patch
M native_client_sdk/src/libraries/nacl_io/fifo_char.cc View 1 2 3 3 chunks +11 lines, -10 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/httpfs/http_fs.cc View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc View 1 2 3 4 5 6 7 8 9 3 chunks +22 lines, -7 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -4 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc View 1 2 3 4 5 6 4 chunks +44 lines, -19 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/osinttypes.h View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/socket/fifo_packet.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M native_client_sdk/src/libraries/nacl_io/socket/packet.h View 2 chunks +1 line, -5 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/socket/packet.cc View 1 2 2 chunks +4 lines, -8 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/socket/tcp_node.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -3 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc View 1 2 3 4 5 6 7 8 2 chunks +1 line, -4 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
binji
https://codereview.chromium.org/443693002/diff/20001/native_client_sdk/src/libraries/nacl_io/fifo_char.cc File native_client_sdk/src/libraries/nacl_io/fifo_char.cc (right): https://codereview.chromium.org/443693002/diff/20001/native_client_sdk/src/libraries/nacl_io/fifo_char.cc#newcode17 native_client_sdk/src/libraries/nacl_io/fifo_char.cc:17: buffer_ = (char*)malloc(size); we should probably check for NULL ...
6 years, 4 months ago (2014-08-05 19:30:29 UTC) #1
Sam Clegg
https://codereview.chromium.org/443693002/diff/20001/native_client_sdk/src/libraries/nacl_io/fifo_char.cc File native_client_sdk/src/libraries/nacl_io/fifo_char.cc (right): https://codereview.chromium.org/443693002/diff/20001/native_client_sdk/src/libraries/nacl_io/fifo_char.cc#newcode17 native_client_sdk/src/libraries/nacl_io/fifo_char.cc:17: buffer_ = (char*)malloc(size); On 2014/08/05 19:30:29, binji wrote: > ...
6 years, 4 months ago (2014-08-06 09:10:32 UTC) #2
binji
lgtm https://codereview.chromium.org/443693002/diff/40001/native_client_sdk/src/libraries/nacl_io/fifo_char.cc File native_client_sdk/src/libraries/nacl_io/fifo_char.cc (right): https://codereview.chromium.org/443693002/diff/40001/native_client_sdk/src/libraries/nacl_io/fifo_char.cc#newcode42 native_client_sdk/src/libraries/nacl_io/fifo_char.cc:42: assert(buffer_ != NULL); could return false here? https://codereview.chromium.org/443693002/diff/40001/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs.cc ...
6 years, 4 months ago (2014-08-06 17:18:00 UTC) #3
Sam Clegg
https://codereview.chromium.org/443693002/diff/40001/native_client_sdk/src/libraries/nacl_io/fifo_char.cc File native_client_sdk/src/libraries/nacl_io/fifo_char.cc (right): https://codereview.chromium.org/443693002/diff/40001/native_client_sdk/src/libraries/nacl_io/fifo_char.cc#newcode42 native_client_sdk/src/libraries/nacl_io/fifo_char.cc:42: assert(buffer_ != NULL); On 2014/08/06 17:17:59, binji wrote: > ...
6 years, 4 months ago (2014-08-07 11:49:52 UTC) #4
binji
https://codereview.chromium.org/443693002/diff/100001/native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc File native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc (right): https://codereview.chromium.org/443693002/diff/100001/native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc#newcode76 native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc:76: LOG_ERROR("memfs: resize %ld failed: %s", new_size, strerror(error)); Looks like ...
6 years, 4 months ago (2014-08-07 15:22:32 UTC) #5
Sam Clegg
On 2014/08/07 15:22:32, binji wrote: > https://codereview.chromium.org/443693002/diff/100001/native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc > File native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc (right): > > https://codereview.chromium.org/443693002/diff/100001/native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc#newcode76 > ...
6 years, 4 months ago (2014-08-07 17:36:54 UTC) #6
binji
lgtm https://codereview.chromium.org/443693002/diff/160001/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc File native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc (right): https://codereview.chromium.org/443693002/diff/160001/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc#newcode566 native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc:566: buffer_len_ = kBytesToRead; should set buffer_len_ to 0 ...
6 years, 4 months ago (2014-08-07 17:52:52 UTC) #7
Sam Clegg
https://codereview.chromium.org/443693002/diff/160001/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc File native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc (right): https://codereview.chromium.org/443693002/diff/160001/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc#newcode566 native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc:566: buffer_len_ = kBytesToRead; On 2014/08/07 17:52:52, binji wrote: > ...
6 years, 4 months ago (2014-08-08 09:26:37 UTC) #8
Sam Clegg
6 years, 4 months ago (2014-08-08 10:37:22 UTC) #9
Message was sent while issue was closed.
Committed patchset #10 manually as 288314 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698