Commit 23ab6b68 authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[iwyu] Remove include factory.h -> js-array-buffer.h

BUG=v8:7490,v8:8562

Change-Id: Ie3e277fef97900dbefbf08cb02f6c03e8dd408b7
Reviewed-on: https://chromium-review.googlesource.com/c/1379877Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58285}
parent ecdcae84
......@@ -24,6 +24,10 @@
namespace v8 {
namespace internal {
class JSArrayBufferView;
} // namespace internal
// Constants used in the implementation of the API. The most natural thing
// would usually be to place these with the classes that use them, but
// we want to keep them out of v8.h because it is an externally
......
......@@ -20,6 +20,7 @@
#include "src/objects.h"
#include "src/objects/arguments.h"
#include "src/objects/data-handler.h"
#include "src/objects/js-array-buffer.h"
#include "src/objects/map.h"
#include "src/objects/maybe-object.h"
#include "src/runtime/runtime.h"
......@@ -290,6 +291,7 @@ class Filler;
class FunctionTemplateRareData;
class InternalizedString;
class JSArgumentsObject;
class JSArrayBufferView;
class JSContextExtensionObject;
class JSError;
class JSSloppyArgumentsObject;
......
......@@ -16,7 +16,6 @@
#include "src/objects/code.h"
#include "src/objects/dictionary.h"
#include "src/objects/hash-table.h"
#include "src/objects/js-array-buffer.h"
#include "src/objects/js-array.h"
#include "src/objects/js-regexp.h"
#include "src/objects/ordered-hash-table.h"
......@@ -41,6 +40,7 @@ class DebugInfo;
class EnumCache;
class FreshlyAllocatedBigInt;
class Isolate;
class JSDataView;
class JSGeneratorObject;
class JSMap;
class JSMapIterator;
......@@ -49,6 +49,7 @@ class JSPromise;
class JSProxy;
class JSSet;
class JSSetIterator;
class JSTypedArray;
class JSWeakMap;
class LoadHandler;
class ModuleInfo;
......@@ -68,6 +69,7 @@ class WeakFactoryCleanupJobTask;
struct SourceRange;
template <typename T>
class ZoneVector;
enum class SharedFlag : uint32_t;
enum FunctionMode {
kWithNameBit = 1 << 0,
......@@ -658,9 +660,8 @@ class V8_EXPORT_PRIVATE Factory {
Handle<Module> NewModule(Handle<SharedFunctionInfo> code);
Handle<JSArrayBuffer> NewJSArrayBuffer(
SharedFlag shared = SharedFlag::kNotShared,
PretenureFlag pretenure = NOT_TENURED);
Handle<JSArrayBuffer> NewJSArrayBuffer(SharedFlag shared,
PretenureFlag pretenure = NOT_TENURED);
static void TypeAndSizeForElementsKind(ElementsKind kind,
ExternalArrayType* array_type,
......
......@@ -969,7 +969,8 @@ RUNTIME_FUNCTION(Runtime_SerializeWasmModule) {
wasm::WasmSerializer wasm_serializer(native_module);
size_t compiled_size = wasm_serializer.GetSerializedNativeModuleSize();
void* array_data = isolate->array_buffer_allocator()->Allocate(compiled_size);
Handle<JSArrayBuffer> array_buffer = isolate->factory()->NewJSArrayBuffer();
Handle<JSArrayBuffer> array_buffer =
isolate->factory()->NewJSArrayBuffer(SharedFlag::kNotShared);
JSArrayBuffer::Setup(array_buffer, isolate, false, array_data, compiled_size);
if (!array_data ||
!wasm_serializer.SerializeNativeModule(
......
......@@ -260,7 +260,8 @@ Handle<JSArray> GetCustomSections(Isolate* isolate,
thrower->RangeError("out of memory allocating custom section data");
return Handle<JSArray>();
}
Handle<JSArrayBuffer> buffer = isolate->factory()->NewJSArrayBuffer();
Handle<JSArrayBuffer> buffer =
isolate->factory()->NewJSArrayBuffer(SharedFlag::kNotShared);
constexpr bool is_external = false;
JSArrayBuffer::Setup(buffer, isolate, is_external, memory, size);
memcpy(memory, wire_bytes.start() + section.payload.offset(),
......
......@@ -53,7 +53,8 @@ class JSTypedLoweringTest : public TypedGraphTest {
}
Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) {
Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer();
Handle<JSArrayBuffer> buffer =
factory()->NewJSArrayBuffer(SharedFlag::kNotShared);
JSArrayBuffer::Setup(buffer, isolate(), true, bytes, byte_length);
return buffer;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment