[webkit-changes] cvs commit: WebCore/khtml/ecma kjs_binding.cpp
Timothy
thatcher at opensource.apple.com
Fri Oct 21 14:04:29 PDT 2005
thatcher 05/10/21 14:04:29
Modified: khtml/ecma Tag: Safari-2-0-branch kjs_binding.cpp
Log:
Rolling out some local test changes that CVS wasn't suppose to commit.
Revision Changes Path
No revision
No revision
1.26.8.7 +12 -24 WebCore/khtml/ecma/kjs_binding.cpp
Index: kjs_binding.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_binding.cpp,v
retrieving revision 1.26.8.6
retrieving revision 1.26.8.7
diff -u -r1.26.8.6 -r1.26.8.7
--- kjs_binding.cpp 21 Oct 2005 20:58:41 -0000 1.26.8.6
+++ kjs_binding.cpp 21 Oct 2005 21:04:28 -0000 1.26.8.7
@@ -34,7 +34,7 @@
using DOM::DOMString;
namespace KJS {
-#if 0
+
/* TODO:
* The catch all (...) clauses below shouldn't be necessary.
* But they helped to view for example www.faz.net in an stable manner.
@@ -46,10 +46,9 @@
Value DOMObject::get(ExecState *exec, const Identifier &p) const
{
Value result;
-// try {
+ try {
result = tryGet(exec,p);
-// }
-#if 0
+ }
catch (DOM::DOMException e) {
// ### translate code into readable string ?
// ### oh, and s/QString/i18n or I18N_NOOP (the code in kjs uses I18N_NOOP... but where is it translated ?)
@@ -63,17 +62,16 @@
kdError(6070) << "Unknown exception in DOMObject::get()" << endl;
result = String("Unknown exception");
}
-#endif
+
return result;
}
void DOMObject::put(ExecState *exec, const Identifier &propertyName,
const Value &value, int attr)
{
-// try {
+ try {
tryPut(exec, propertyName, value, attr);
-// }
-#if 0
+ }
catch (DOM::DOMException e) {
Object err = Error::create(exec, GeneralError, QString("DOM exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
@@ -82,7 +80,6 @@
catch (...) {
kdError(6070) << "Unknown exception in DOMObject::put()" << endl;
}
-#endif
}
UString DOMObject::toString(ExecState *) const
@@ -93,10 +90,9 @@
Value DOMFunction::get(ExecState *exec, const Identifier &propertyName) const
{
Value result;
-// try {
+ try {
result = tryGet(exec, propertyName);
-// }
-#if 0
+ }
catch (DOM::DOMException e) {
result = Undefined();
Object err = Error::create(exec, GeneralError, QString("DOM exception %1").arg(e.code).local8Bit());
@@ -107,18 +103,17 @@
kdError(6070) << "Unknown exception in DOMFunction::get()" << endl;
result = String("Unknown exception");
}
-#endif
+
return result;
}
Value DOMFunction::call(ExecState *exec, Object &thisObj, const List &args)
{
Value val;
-// try {
+ try {
val = tryCall(exec, thisObj, args);
-// }
+ }
// pity there's no way to distinguish between these in JS code
-#if 0
catch (DOM::DOMException e) {
Object err = Error::create(exec, GeneralError, QString("DOM Exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
@@ -144,7 +139,6 @@
Object err = Error::create(exec, GeneralError, "Unknown exception");
exec->setException(err);
}
-#endif
return val;
}
@@ -178,8 +172,6 @@
#endif
}
-#endif
-
ScriptInterpreter::~ScriptInterpreter()
{
#ifdef KJS_VERBOSE
@@ -187,8 +179,6 @@
#endif
}
-#if 0
-
void ScriptInterpreter::forgetDOMObject( void* objectHandle )
{
deleteDOMObject( objectHandle );
@@ -428,6 +418,4 @@
return res;
}
-#endif
-
-}
\ No newline at end of file
+}
More information about the webkit-changes
mailing list