Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! fixup! src: store onread callback in internal field
  • Loading branch information
addaleax committed Mar 26, 2019
commit c3ef805d9a463baa3441e9b197a1405741f317e3
2 changes: 1 addition & 1 deletion src/base_object-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void BaseObject::InternalFieldSet(v8::Local<v8::String> property,
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<void>& info) {
// This could be e.g. value->IsFunction().
CHECK_IMPLIES(typecheck != nullptr, ((*value)->*typecheck)());
CHECK(((*value)->*typecheck)());
info.This()->SetInternalField(Field, value);
}

Expand Down
2 changes: 1 addition & 1 deletion src/base_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class BaseObject : public MemoryRetainer {
template <int Field>
static void InternalFieldGet(v8::Local<v8::String> property,
const v8::PropertyCallbackInfo<v8::Value>& info);
template <int Field, bool (v8::Value::* typecheck)() const = nullptr>
template <int Field, bool (v8::Value::* typecheck)() const>
static void InternalFieldSet(v8::Local<v8::String> property,
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<void>& info);
Expand Down