STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(NativeErrorConstructor);
-const ClassInfo NativeErrorConstructor::s_info = { "Function", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(NativeErrorConstructor) };
+const ClassInfo NativeErrorConstructor::s_info = { "Function", &InternalFunction::s_info, 0, CREATE_METHOD_TABLE(NativeErrorConstructor) };
NativeErrorConstructor::NativeErrorConstructor(VM& vm, Structure* structure)
: InternalFunction(vm, structure)
{
NativeErrorConstructor* thisObject = jsCast<NativeErrorConstructor*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
- ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
-
- InternalFunction::visitChildren(thisObject, visitor);
+ Base::visitChildren(thisObject, visitor);
visitor.append(&thisObject->m_errorStructure);
}
JSValue message = exec->argument(0);
Structure* errorStructure = static_cast<NativeErrorConstructor*>(exec->callee())->errorStructure();
ASSERT(errorStructure);
- Vector<StackFrame> stackTrace;
- exec->vm().interpreter->getStackTrace(stackTrace, std::numeric_limits<size_t>::max());
- stackTrace.remove(0);
- return JSValue::encode(ErrorInstance::create(exec, errorStructure, message, stackTrace));
+ return JSValue::encode(ErrorInstance::create(exec, errorStructure, message, nullptr, TypeNothing, false));
}
ConstructType NativeErrorConstructor::getConstructData(JSCell*, ConstructData& constructData)
{
JSValue message = exec->argument(0);
Structure* errorStructure = static_cast<NativeErrorConstructor*>(exec->callee())->errorStructure();
- Vector<StackFrame> stackTrace;
- exec->vm().interpreter->getStackTrace(stackTrace, std::numeric_limits<size_t>::max());
- stackTrace.remove(0);
- return JSValue::encode(ErrorInstance::create(exec, errorStructure, message, stackTrace));
+ return JSValue::encode(ErrorInstance::create(exec, errorStructure, message, nullptr, TypeNothing, false));
}
CallType NativeErrorConstructor::getCallData(JSCell*, CallData& callData)