Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
chakrashim: fix lint errors
Browse files Browse the repository at this point in the history
PR-URL: #552
Reviewed-By: Jimmy Thomson <[email protected]>
Reviewed-By: Taylor Woll <[email protected]>
  • Loading branch information
kfarnung committed Jun 28, 2018
1 parent 82b66c3 commit 8bd7b0e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 48 deletions.
82 changes: 41 additions & 41 deletions deps/chakrashim/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -2092,43 +2092,43 @@ class V8_EXPORT ArrayBufferView : public Object {
};

class V8_EXPORT SharedArrayBuffer : public Object {
public:
class V8_EXPORT Contents { // NOLINT
public:
Contents()
: data_(nullptr),
byte_length_(0),
allocation_base_(nullptr),
allocation_length_(0),
allocation_mode_(ArrayBuffer::Allocator::AllocationMode::kNormal) {}

void* AllocationBase() const { return allocation_base_; }
size_t AllocationLength() const { return allocation_length_; }
ArrayBuffer::Allocator::AllocationMode AllocationMode() const {
return allocation_mode_;
}

void* Data() const { return data_; }
size_t ByteLength() const { return byte_length_; }

private:
void* data_;
size_t byte_length_;
void* allocation_base_;
size_t allocation_length_;
ArrayBuffer::Allocator::AllocationMode allocation_mode_;

friend class SharedArrayBuffer;
};
public:
class V8_EXPORT Contents { // NOLINT
public:
Contents()
: data_(nullptr),
byte_length_(0),
allocation_base_(nullptr),
allocation_length_(0),
allocation_mode_(ArrayBuffer::Allocator::AllocationMode::kNormal) {}

void* AllocationBase() const { return allocation_base_; }
size_t AllocationLength() const { return allocation_length_; }
ArrayBuffer::Allocator::AllocationMode AllocationMode() const {
return allocation_mode_;
}

void* Data() const { return data_; }
size_t ByteLength() const { return byte_length_; }

private:
void* data_;
size_t byte_length_;
void* allocation_base_;
size_t allocation_length_;
ArrayBuffer::Allocator::AllocationMode allocation_mode_;

static Local<SharedArrayBuffer> New(
Isolate* isolate, void* data, size_t byte_length,
ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
static SharedArrayBuffer* Cast(Value* obj);
Contents Externalize();
friend class SharedArrayBuffer;
};

private:
SharedArrayBuffer();
static Local<SharedArrayBuffer> New(
Isolate* isolate, void* data, size_t byte_length,
ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
static SharedArrayBuffer* Cast(Value* obj);
Contents Externalize();

private:
SharedArrayBuffer();
};

class V8_EXPORT TypedArray : public ArrayBufferView {
Expand Down Expand Up @@ -2223,13 +2223,13 @@ class V8_EXPORT Float64Array : public TypedArray {
};

class V8_EXPORT BigUint64Array : public TypedArray {
public:
static Local<BigUint64Array> New(Local<ArrayBuffer> array_buffer,
size_t byte_offset, size_t length);
static BigUint64Array* Cast(Value* obj);
public:
static Local<BigUint64Array> New(Local<ArrayBuffer> array_buffer,
size_t byte_offset, size_t length);
static BigUint64Array* Cast(Value* obj);

private:
BigUint64Array();
private:
BigUint64Array();
};

class V8_EXPORT JSON {
Expand Down
12 changes: 6 additions & 6 deletions deps/chakrashim/lib/chakra_shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@

// TODO: Remove this shim when BigUint64Array is supported in chakra
Object_defineProperty(global, 'BigUint64Array',
{
value: Uint32Array,
configurable: true,
writable: true,
enumerable: false
});
{
value: Uint32Array,
configurable: true,
writable: true,
enumerable: false
});

// Simulate V8 JavaScript stack trace API
function StackFrame(func, funcName, fileName, lineNumber, columnNumber) {
Expand Down
3 changes: 2 additions & 1 deletion deps/chakrashim/src/jsrtcontextshim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ static const char* s_globalTypeNames[] = {

bool ContextShim::InitializeGlobalTypes() {
for (int i = 0; i < GlobalType::_TypeCount; i++) {
// TODO: Remove this shim when BigUint64Array is supported in chakra
// TODO(boingoing): Remove this shim when BigUint64Array is supported in
// chakra
const char* globalName = (i != GlobalType::BigUint64Array) ?
s_globalTypeNames[i] :
s_globalTypeNames[GlobalType::Uint32Array];
Expand Down

0 comments on commit 8bd7b0e

Please sign in to comment.