X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..HEAD:/runtime/NativeErrorConstructor.cpp diff --git a/runtime/NativeErrorConstructor.cpp b/runtime/NativeErrorConstructor.cpp index 6260055..3fb58a3 100644 --- a/runtime/NativeErrorConstructor.cpp +++ b/runtime/NativeErrorConstructor.cpp @@ -31,7 +31,7 @@ namespace JSC { 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) @@ -56,10 +56,7 @@ void NativeErrorConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor) { NativeErrorConstructor* thisObject = jsCast(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); } @@ -68,10 +65,7 @@ EncodedJSValue JSC_HOST_CALL Interpreter::constructWithNativeErrorConstructor(Ex JSValue message = exec->argument(0); Structure* errorStructure = static_cast(exec->callee())->errorStructure(); ASSERT(errorStructure); - Vector stackTrace; - exec->vm().interpreter->getStackTrace(stackTrace, std::numeric_limits::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) @@ -84,10 +78,7 @@ EncodedJSValue JSC_HOST_CALL Interpreter::callNativeErrorConstructor(ExecState* { JSValue message = exec->argument(0); Structure* errorStructure = static_cast(exec->callee())->errorStructure(); - Vector stackTrace; - exec->vm().interpreter->getStackTrace(stackTrace, std::numeric_limits::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)