[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/khtml/ecma
From:       Luís Pedro Coelho <luis () luispedro ! org>
Date:       2004-06-17 23:02:19
Message-ID: 20040617230219.8E2B09092 () office ! kde ! org
[Download RAW message or body]

CVS commit by luis_pedro: 

Correctly handle unparseable javascript (the error logic was wrong).

[konqueror was crashing on
	<body onload="Can't parse this">
]

(Reviewed by Zack).


  M +4 -6      kjs_events.cpp   1.86


--- kdelibs/khtml/ecma/kjs_events.cpp  #1.85:1.86
@@ -188,13 +188,11 @@ void JSLazyEventListener::parseCode() co
         // failed to parse, so let's just make this listener a no-op
         listener = Object();
-      }
-
-      if (!listener.inherits(&DeclaredFunctionImp::info)) {
+      } else if (!listener.inherits(&DeclaredFunctionImp::info)) {
         listener = Object();// Error creating function
-      }
-
+      } else {
       DeclaredFunctionImp *declFunc = static_cast<DeclaredFunctionImp*>(listener.imp());
       declFunc->setName(Identifier(name));
     }
+    }
 
     // no more need to keep the unparsed code around


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic