31 ASSERT_CLASS_FITS_IN_CELL(NativeErrorConstructor); |
31 ASSERT_CLASS_FITS_IN_CELL(NativeErrorConstructor); |
32 |
32 |
33 const ClassInfo NativeErrorConstructor::info = { "Function", &InternalFunction::info, 0, 0 }; |
33 const ClassInfo NativeErrorConstructor::info = { "Function", &InternalFunction::info, 0, 0 }; |
34 |
34 |
35 NativeErrorConstructor::NativeErrorConstructor(ExecState* exec, NonNullPassRefPtr<Structure> structure, NativeErrorPrototype* nativeErrorPrototype) |
35 NativeErrorConstructor::NativeErrorConstructor(ExecState* exec, NonNullPassRefPtr<Structure> structure, NativeErrorPrototype* nativeErrorPrototype) |
36 : InternalFunction(&exec->globalData(), structure, Identifier(exec, nativeErrorPrototype->getDirect(exec->propertyNames().name).getString())) |
36 : InternalFunction(&exec->globalData(), structure, Identifier(exec, nativeErrorPrototype->getDirect(exec->propertyNames().name).getString(exec))) |
37 , m_errorStructure(ErrorInstance::createStructure(nativeErrorPrototype)) |
37 , m_errorStructure(ErrorInstance::createStructure(nativeErrorPrototype)) |
38 { |
38 { |
39 putDirect(exec->propertyNames().length, jsNumber(exec, 1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5 |
39 putDirect(exec->propertyNames().length, jsNumber(exec, 1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5 |
40 putDirect(exec->propertyNames().prototype, nativeErrorPrototype, DontDelete | ReadOnly | DontEnum); |
40 putDirect(exec->propertyNames().prototype, nativeErrorPrototype, DontDelete | ReadOnly | DontEnum); |
41 } |
41 } |