Changeset 10207 in webkit for trunk/JavaScriptCore/kjs/internal.cpp
- Timestamp:
- Aug 15, 2005, 5:47:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/internal.cpp
r10182 r10207 128 128 ObjectImp *UndefinedImp::toObject(ExecState *exec) const 129 129 { 130 ObjectImp *err = Error::create(exec, TypeError, I18N_NOOP("Undefined value")); 131 exec->setException(err); 132 return err; 130 return throwError(exec, TypeError, "Undefined value"); 133 131 } 134 132 … … 157 155 ObjectImp *NullImp::toObject(ExecState *exec) const 158 156 { 159 ObjectImp *err = Error::create(exec, TypeError, I18N_NOOP("Null value")); 160 exec->setException(err); 161 return err; 157 return throwError(exec, TypeError, "Null value"); 162 158 } 163 159 … … 665 661 // no program node means a syntax error occurred 666 662 if (!progNode) { 667 ObjectImp *err = Error::create(&globExec, SyntaxError, errMsg.ascii(), errLine, -1, &sourceURL); 668 err->put(&globExec, "sid", Number(sid)); 663 ObjectImp *err = Error::create(&globExec, SyntaxError, errMsg, errLine, sid, &sourceURL); 669 664 #if APPLE_CHANGES 670 665 unlockInterpreter(); … … 827 822 ValueImp *prot = get(exec,prototypePropertyName); 828 823 if (!prot->isObject() && !prot->isNull()) { 829 ObjectImp *err = Error::create(exec, TypeError, "Invalid prototype encountered " 830 "in instanceof operation."); 831 exec->setException(err); 824 throwError(exec, TypeError, "Invalid prototype encountered in instanceof operation."); 832 825 return false; 833 826 }
Note:
See TracChangeset
for help on using the changeset viewer.