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

Commit

Permalink
chakrashim: Implement IsMap/IsSet after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak authored and Jianchun Xu committed Jan 6, 2016
1 parent b259f11 commit 8d722fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deps/chakrashim/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,8 @@ class V8_EXPORT Value : public Data {
bool IsDataView() const;
bool IsMapIterator() const;
bool IsSetIterator() const;
bool IsMap() const;
bool IsSet() const;
bool IsPromise() const;

V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
Expand Down
2 changes: 2 additions & 0 deletions deps/chakrashim/src/jsrtcontextcachedobj.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ DEFTYPE(Float32Array)
DEFTYPE(Float64Array)
DEFTYPE(URIError)
DEFTYPE(Promise)
DEFTYPE(Map)
DEFTYPE(Set)


// These prototype functions will be cached/shimmed
Expand Down
9 changes: 9 additions & 0 deletions deps/chakrashim/src/v8value.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ bool Value::IsNumberObject() const {
bool Value::IsStringObject() const {
return IsOfType(this, ContextShim::GlobalType::String);
}
bool Value::IsMap() const
{
return IsOfType(this, ContextShim::GlobalType::Map);
}

bool Value::IsSet() const
{
return IsOfType(this, ContextShim::GlobalType::Set);
}

bool Value::IsNativeError() const {
return IsOfType(this, ContextShim::GlobalType::Error)
Expand Down

0 comments on commit 8d722fa

Please sign in to comment.