mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
Add IsHTMLDDA feature
* https://www.ecma-international.org/ecma-262/#sec-IsHTMLDDA-internal-slot * IsHTMLDDA internal slot is an ECMAScript feature for Web Browsers * IsHTMLDDA is currently enabled only for test mode (we can enable it later if it is really used by third party app) * some related operations are optionally fixed Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
ca012fe376
commit
e0bd962e6e
11 changed files with 93 additions and 32 deletions
|
|
@ -3584,14 +3584,21 @@ NEVER_INLINE void ByteCodeInterpreter::unaryTypeof(ExecutionState& state, UnaryT
|
|||
} else {
|
||||
ASSERT(val.isPointerValue());
|
||||
PointerValue* p = val.asPointerValue();
|
||||
if (p->isCallable()) {
|
||||
val = state.context()->staticStrings().function.string();
|
||||
} else if (p->isSymbol()) {
|
||||
if (p->isSymbol()) {
|
||||
val = state.context()->staticStrings().symbol.string();
|
||||
} else if (p->isBigInt()) {
|
||||
val = state.context()->staticStrings().bigint.string();
|
||||
} else {
|
||||
val = state.context()->staticStrings().object.string();
|
||||
ASSERT(p->isObject());
|
||||
if (!p->isCallable()) {
|
||||
val = state.context()->staticStrings().object.string();
|
||||
#if defined(ESCARGOT_ENABLE_TEST)
|
||||
} else if (UNLIKELY(p->asObject()->isHTMLDDA())) {
|
||||
val = state.context()->staticStrings().undefined.string();
|
||||
#endif
|
||||
} else {
|
||||
val = state.context()->staticStrings().function.string();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue