v8/test/unittests
Ulan Degenbaev b6b7de0d60 Reland x6 [arraybuffer] Rearchitect backing store ownership
This reverts commit 9da3483136

Original change's description:
> "Reland x4 [arraybuffer] Rearchitect backing store ownership"
>
> This is a reland of bc33f5aeba
>
> Contributed by titzer@chromium.org
>
> Original change's description:
> > [arraybuffer] Rearchitect backing store ownership
> >
> > This CL completely rearchitects the ownership of array buffer backing stores,
> > consolidating ownership into a {BackingStore} C++ object that is tracked
> > throughout V8 using unique_ptr and shared_ptr where appropriate.
> >
> > Overall, lifetime management is simpler and more explicit. The numerous
> > ways that array buffers were initialized have been streamlined to one
> > Attach() method on JSArrayBuffer. The array buffer tracker in the
> > GC implementation now manages std::shared_ptr<BackingStore> pointers,
> > and the construction and destruction of the BackingStore object itself
> > handles the underlying page or embedder-allocated memory.
> >
> > The embedder API remains unchanged for now. We use the
> > v8::ArrayBuffer::Contents struct to hide an additional shared_ptr to
> > keep the backing store alive properly, even in the case of aliases
> > from live heap objects. Thus the embedder has a lower chance of making
> > a mistake. Long-term, we should move the embedder to a model where they
> > manage backing stores using shared_ptr to an opaque backing store object.
>
> TBR=yangguo@chromium.org
>
> BUG=v8:9380,v8:9221,chromium:986318
>
> Change-Id: If671a4a9ca0476e8f084efae46e0d2bf99ed99ef
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1731005
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>

> Cr-Commit-Position: refs/heads/master@{#63041}

TBR=yangguo@chromium.org

Change-Id: I3cc4bb80081c662b1751234bc16a821c20e744be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1792166
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63617}
2019-09-09 13:07:42 +00:00
..
api Calls to {console} require an access check for the provided arguments 2019-08-08 07:19:54 +00:00
asmjs Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
assembler Move architecture dependent files 2019-05-28 14:02:15 +00:00
base Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
codegen [cleanup] TNodify nodes which are set by a TNode function 2019-08-22 10:30:16 +00:00
compiler Reland x6 [arraybuffer] Rearchitect backing store ownership 2019-09-09 13:07:42 +00:00
compiler-dispatcher [objects] Use function syntax kind enum instead of bits on SFI and ParseInfo 2019-08-23 18:14:48 +00:00
date Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
diagnostics Move unittest files 2019-05-27 08:52:23 +00:00
execution [WeakRefs] Make cleanup callback run as a task 2019-07-30 12:19:39 +00:00
heap [heap, tracing] Use WorkerThreadRuntimeCallStatsScope in background GC 2019-08-29 15:55:48 +00:00
interpreter [CSA] TNodified methods related to call and construct 2019-09-09 12:34:12 +00:00
libplatform Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
logging [counters] Introduce proper bottleneck for FunctionCallback. 2019-06-12 09:04:38 +00:00
numbers [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
objects Reland x6 [arraybuffer] Rearchitect backing store ownership 2019-09-09 13:07:42 +00:00
parser Move remaining files in src/ 2019-05-24 18:24:36 +00:00
profiler [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
regress Move relevant files to src/execution 2019-05-22 08:36:33 +00:00
strings [cleanup] Remove 'typedef struct' and 'typedef enum' 2019-05-28 12:17:35 +00:00
tasks [objects] Use function syntax kind enum instead of bits on SFI and ParseInfo 2019-08-23 18:14:48 +00:00
torque [torque] Replace ReferenceType by generic Torque struct Reference<T> 2019-07-26 14:26:51 +00:00
utils [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
wasm Reland x6 [arraybuffer] Rearchitect backing store ownership 2019-09-09 13:07:42 +00:00
zone [zone] Remove segment pooling from accounting allocator 2019-03-01 09:25:48 +00:00
BUILD.gn Reland x6 [arraybuffer] Rearchitect backing store ownership 2019-09-09 13:07:42 +00:00
DEPS Move unit tests to test/unittests. 2014-10-01 08:34:25 +00:00
run-all-unittests.cc Reland "Add test to show the crashing of TimeZone::AdoptDefault" 2019-05-16 09:38:43 +00:00
test-helpers.cc [SFI] Always store function_literal_id in SFI. 2019-06-21 16:23:27 +00:00
test-helpers.h [Compiler] Remove CompilerDispatcherJob and use BackgroundCompileTask directly 2018-10-09 10:39:27 +00:00
test-utils.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
test-utils.h [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
testcfg.py Reland "Preparing v8 to use with python3 /test" 2019-03-20 09:56:06 +00:00
unittests.status Reland x6 [arraybuffer] Rearchitect backing store ownership 2019-09-09 13:07:42 +00:00