|
|
Created:
4 years, 7 months ago by Michael Lippautz Modified:
4 years, 7 months ago Reviewers:
jochen (gone - plz use gerrit) CC:
Paweł Hajdan Jr., v8-reviews_googlegroups.com, ulan Base URL:
https://chromium.googlesource.com/v8/v8.git@master Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[api] Clarify expectations of ArrayBuffer::Allocator in API
BUG=chromium:611688
LOG=Y
R=jochen@chromium.org
Committed: https://crrev.com/b32f9599bee0f37fd75129482b0008b953870129
Cr-Commit-Position: refs/heads/master@{#36231}
Patch Set 1 #
Total comments: 4
Patch Set 2 : #Patch Set 3 : Add one more comment #Messages
Total messages: 25 (12 generated)
Description was changed from ========== [api] Clarify expectations for ArrayBuffer::Allocator in API docs BUG= ========== to ========== [api] Clarify expectations for ArrayBuffer::Allocator in API docs LOG=Y R=jochen@chromium.org ==========
mlippautz@chromium.org changed reviewers: + jochen@chromium.org
Description was changed from ========== [api] Clarify expectations for ArrayBuffer::Allocator in API docs LOG=Y R=jochen@chromium.org ========== to ========== [api] Clarify expectations of ArrayBuffer::Allocator in API LOG=Y R=jochen@chromium.org ==========
Description was changed from ========== [api] Clarify expectations for ArrayBuffer::Allocator in API docs LOG=Y R=jochen@chromium.org ========== to ========== [api] Clarify expectations of ArrayBuffer::Allocator in API LOG=Y R=jochen@chromium.org ==========
The CQ bit was checked by mlippautz@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1978773002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1978773002/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/1978773002/diff/1/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1978773002/diff/1/include/v8.h#newcode3460 include/v8.h:3460: * Memory allocated through this allocator is accounted for as external But just of it's allocated by v8? And who has to do the accounting if an array buffer is externalized? And if the embedder allocates the backing store but then gives it as internalized to v8?
https://codereview.chromium.org/1978773002/diff/1/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1978773002/diff/1/include/v8.h#newcode3460 include/v8.h:3460: * Memory allocated through this allocator is accounted for as external On 2016/05/13 09:03:32, jochen (OOO) wrote: > But just of it's allocated by v8? > Yes. > And who has to do the accounting if an array buffer is externalized? Externlize unregisters it from being tracked in V8, also updating the accounting. So the embedder needs to adjust accounting if it keeps the buffer alive. > > And if the embedder allocates the backing store but then gives it as > internalized to v8? Other way round. The embedder should take care of first reducing the count, because V8 will keep track of it. That's how the implementation details currently look like -- or probably should look like since we currently do something different (double-accounting).
https://codereview.chromium.org/1978773002/diff/1/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1978773002/diff/1/include/v8.h#newcode3460 include/v8.h:3460: * Memory allocated through this allocator is accounted for as external On 2016/05/13 at 09:11:22, Michael Lippautz wrote: > On 2016/05/13 09:03:32, jochen (OOO) wrote: > > But just of it's allocated by v8? > > > Yes. > > > And who has to do the accounting if an array buffer is externalized? > > Externlize unregisters it from being tracked in V8, also updating the accounting. So the embedder needs to adjust accounting if it keeps the buffer alive. > > > > > And if the embedder allocates the backing store but then gives it as > > internalized to v8? > > Other way round. The embedder should take care of first reducing the count, because V8 will keep track of it. > > That's how the implementation details currently look like -- or probably should look like since we currently do something different (double-accounting). Can you include all that in the comment?
https://codereview.chromium.org/1978773002/diff/1/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1978773002/diff/1/include/v8.h#newcode3460 include/v8.h:3460: * Memory allocated through this allocator is accounted for as external On 2016/05/13 09:15:03, jochen (OOO) wrote: > On 2016/05/13 at 09:11:22, Michael Lippautz wrote: > > On 2016/05/13 09:03:32, jochen (OOO) wrote: > > > But just of it's allocated by v8? > > > > > Yes. > > > > > And who has to do the accounting if an array buffer is externalized? > > > > Externlize unregisters it from being tracked in V8, also updating the > accounting. So the embedder needs to adjust accounting if it keeps the buffer > alive. > > > > > > > > And if the embedder allocates the backing store but then gives it as > > > internalized to v8? > > > > Other way round. The embedder should take care of first reducing the count, > because V8 will keep track of it. > > > > That's how the implementation details currently look like -- or probably > should look like since we currently do something different (double-accounting). > > Can you include all that in the comment? Done.
lgtm
Description was changed from ========== [api] Clarify expectations of ArrayBuffer::Allocator in API LOG=Y R=jochen@chromium.org ========== to ========== [api] Clarify expectations of ArrayBuffer::Allocator in API BUG=chromium:611688 LOG=Y R=jochen@chromium.org ==========
The CQ bit was checked by mlippautz@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1978773002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1978773002/20001
+ulan I added one more sentence that clearly states that it is unsafe to call back into V8 from any of those functions.
The CQ bit was checked by mlippautz@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jochen@chromium.org Link to the patchset: https://codereview.chromium.org/1978773002/#ps40001 (title: "Add one more comment")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1978773002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1978773002/40001
Message was sent while issue was closed.
Description was changed from ========== [api] Clarify expectations of ArrayBuffer::Allocator in API BUG=chromium:611688 LOG=Y R=jochen@chromium.org ========== to ========== [api] Clarify expectations of ArrayBuffer::Allocator in API BUG=chromium:611688 LOG=Y R=jochen@chromium.org ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== [api] Clarify expectations of ArrayBuffer::Allocator in API BUG=chromium:611688 LOG=Y R=jochen@chromium.org ========== to ========== [api] Clarify expectations of ArrayBuffer::Allocator in API BUG=chromium:611688 LOG=Y R=jochen@chromium.org Committed: https://crrev.com/b32f9599bee0f37fd75129482b0008b953870129 Cr-Commit-Position: refs/heads/master@{#36231} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/b32f9599bee0f37fd75129482b0008b953870129 Cr-Commit-Position: refs/heads/master@{#36231} |