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

Commit 43bd7a8

Browse files
committed
chakrashim: fixing misc lint issues
* Replaced usages of NULL with nullptr * Fixed indentation in class PR-URL: #441 Reviewed-By: Jimmy Thomson <jithomso@microsoft.com> Reviewed-By: Taylor Woll <taylor.woll@microsoft.com>
1 parent 197665e commit 43bd7a8

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

deps/chakrashim/include/v8.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ class PersistentBase {
535535
template <class S>
536536
V8_INLINE void Reset(Isolate* isolate, const PersistentBase<S>& other);
537537

538-
V8_INLINE bool IsEmpty() const { return val_ == NULL; }
538+
V8_INLINE bool IsEmpty() const { return val_ == nullptr; }
539539
V8_INLINE void Empty() { Reset(); }
540540

541541
V8_INLINE Local<T> Get(Isolate* isolate) const {
@@ -843,8 +843,8 @@ class V8_EXPORT Data {
843843
};
844844

845845
class V8_EXPORT ScriptOrModule {
846-
public:
847-
Local<Value> GetResourceName();
846+
public:
847+
Local<Value> GetResourceName();
848848
};
849849

850850
class ScriptOrigin {
@@ -937,12 +937,12 @@ class V8_EXPORT ScriptCompiler {
937937
Source(
938938
Local<String> source_string,
939939
const ScriptOrigin& origin,
940-
CachedData * cached_data = NULL)
940+
CachedData * cached_data = nullptr)
941941
: source_string(source_string), resource_name(origin.ResourceName()) {
942942
}
943943

944944
Source(Local<String> source_string, // NOLINT(runtime/explicit)
945-
CachedData * cached_data = NULL)
945+
CachedData * cached_data = nullptr)
946946
: source_string(source_string) {
947947
}
948948

@@ -1231,7 +1231,7 @@ class V8_EXPORT String : public Name {
12311231
int options = NO_OPTIONS) const;
12321232
int WriteUtf8(char* buffer,
12331233
int length = -1,
1234-
int* nchars_ref = NULL,
1234+
int* nchars_ref = nullptr,
12351235
int options = NO_OPTIONS) const;
12361236

12371237
static Local<String> Empty(Isolate* isolate);
@@ -1995,7 +1995,7 @@ class V8_EXPORT ArrayBuffer : public Object {
19951995

19961996
class V8_EXPORT Contents { // NOLINT
19971997
public:
1998-
Contents() : data_(NULL), byte_length_(0) {}
1998+
Contents() : data_(nullptr), byte_length_(0) {}
19991999
void* Data() const { return data_; }
20002000
size_t ByteLength() const { return byte_length_; }
20012001

@@ -2628,13 +2628,13 @@ class V8_EXPORT Isolate {
26282628
public:
26292629
struct CreateParams {
26302630
CreateParams()
2631-
: entry_hook(NULL),
2632-
code_event_handler(NULL),
2633-
snapshot_blob(NULL),
2634-
counter_lookup_callback(NULL),
2635-
create_histogram_callback(NULL),
2636-
add_histogram_sample_callback(NULL),
2637-
array_buffer_allocator(NULL) {
2631+
: entry_hook(nullptr),
2632+
code_event_handler(nullptr),
2633+
snapshot_blob(nullptr),
2634+
counter_lookup_callback(nullptr),
2635+
create_histogram_callback(nullptr),
2636+
add_histogram_sample_callback(nullptr),
2637+
array_buffer_allocator(nullptr) {
26382638
}
26392639

26402640
FunctionEntryHook entry_hook;
@@ -2716,7 +2716,7 @@ class V8_EXPORT Isolate {
27162716
void SetPromiseHook(PromiseHook hook);
27172717
void SetPromiseRejectCallback(PromiseRejectCallback callback);
27182718
void RunMicrotasks();
2719-
void EnqueueMicrotask(MicrotaskCallback microtask, void* data = NULL);
2719+
void EnqueueMicrotask(MicrotaskCallback microtask, void* data = nullptr);
27202720
void SetAutorunMicrotasks(bool autorun);
27212721
void SetFatalErrorHandler(FatalErrorCallback that);
27222722
void SetJitCodeEventHandler(
@@ -2930,7 +2930,7 @@ class V8_EXPORT Context {
29302930
static Local<Context> New(
29312931
Isolate* isolate,
29322932
bool useGlobalTTState = false,
2933-
ExtensionConfiguration* extensions = NULL,
2933+
ExtensionConfiguration* extensions = nullptr,
29342934
Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(),
29352935
Handle<Value> global_object = Handle<Value>());
29362936
static Local<Context> New(

deps/chakrashim/src/jsrtisolateshim.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
void TTReportLastIOError() {
3333
#ifdef _WIN32
3434
DWORD lastError = GetLastError();
35-
LPTSTR pTemp = NULL;
35+
LPTSTR pTemp = nullptr;
3636
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
3737
FORMAT_MESSAGE_ARGUMENT_ARRAY,
38-
NULL, lastError, 0, (LPTSTR)&pTemp, 0, NULL);
38+
nullptr, lastError, 0, (LPTSTR)&pTemp, 0, nullptr);
3939
fprintf(stderr, "Error is: %i %s\n", lastError, pTemp);
4040
#else
4141
fprintf(stderr, "Error is: %i %s\n", errno, strerror(errno));

0 commit comments

Comments
 (0)