OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/api.h" | 5 #include "src/api.h" |
6 #include "src/heap/array-buffer-tracker.h" | 6 #include "src/heap/array-buffer-tracker.h" |
7 #include "src/heap/spaces.h" | 7 #include "src/heap/spaces.h" |
8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
| 9 #include "src/objects-inl.h" |
9 #include "test/cctest/cctest.h" | 10 #include "test/cctest/cctest.h" |
10 #include "test/cctest/heap/heap-utils.h" | 11 #include "test/cctest/heap/heap-utils.h" |
11 | 12 |
12 namespace { | 13 namespace { |
13 | 14 |
14 typedef i::LocalArrayBufferTracker LocalTracker; | 15 typedef i::LocalArrayBufferTracker LocalTracker; |
15 | 16 |
16 bool IsTracked(i::JSArrayBuffer* buf) { | 17 bool IsTracked(i::JSArrayBuffer* buf) { |
17 return i::ArrayBufferTracker::IsTracked(buf); | 18 return i::ArrayBufferTracker::IsTracked(buf); |
18 } | 19 } |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 Local<v8::ArrayBuffer> ab2 = v8::ArrayBuffer::New(isolate, 100); | 316 Local<v8::ArrayBuffer> ab2 = v8::ArrayBuffer::New(isolate, 100); |
316 Handle<JSArrayBuffer> buf2 = v8::Utils::OpenHandle(*ab2); | 317 Handle<JSArrayBuffer> buf2 = v8::Utils::OpenHandle(*ab2); |
317 CHECK_NE(Page::FromAddress(buf1->address()), | 318 CHECK_NE(Page::FromAddress(buf1->address()), |
318 Page::FromAddress(buf2->address())); | 319 Page::FromAddress(buf2->address())); |
319 heap::GcAndSweep(heap, OLD_SPACE); | 320 heap::GcAndSweep(heap, OLD_SPACE); |
320 } | 321 } |
321 } | 322 } |
322 | 323 |
323 } // namespace internal | 324 } // namespace internal |
324 } // namespace v8 | 325 } // namespace v8 |
OLD | NEW |