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

List:       kde-commits
Subject:    branches/KDE/4.1/kdelibs/khtml/ecma
From:       Harri Porten <porten () kde ! org>
Date:       2008-08-29 1:24:40
Message-ID: 1219973080.381461.6153.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 854183 by porten:

Merged revision 854182:
Event handlers were still accessing the debugger even if it was disabled.

 M  +6 -6      kjs_events.cpp  
 M  +10 -0     kjs_proxy.cpp  
 M  +1 -0      kjs_proxy.h  


--- branches/KDE/4.1/kdelibs/khtml/ecma/kjs_events.cpp #854182:854183
@@ -62,18 +62,18 @@
 
 void JSEventListener::handleEvent(DOM::Event &evt)
 {
-#ifdef KJS_DEBUGGER
-  //### This is the wrong place to do this --- we need 
-  // a more global/general stategy to prevent unwanted event loop recursion issues.
-  if (DebugWindow::window() && DebugWindow::window()->inSession())
-    return;
-#endif
   KHTMLPart *part = qobject_cast<KHTMLPart*>(static_cast<Window*>(win.get())->part());
   KJSProxy *proxy = 0L;
   if (part)
     proxy = part->jScript();
 
   if (proxy && listener && listener->implementsCall()) {
+#ifdef KJS_DEBUGGER
+  //### This is the wrong place to do this --- we need 
+  // a more global/general stategy to prevent unwanted event loop recursion issues.
+    if (proxy->debugEnabled() && DebugWindow::window()->inSession())
+      return;
+#endif
     ref();
 
     KJS::ScriptInterpreter *interpreter = static_cast<KJS::ScriptInterpreter *>(proxy->interpreter());
--- branches/KDE/4.1/kdelibs/khtml/ecma/kjs_proxy.cpp #854182:854183
@@ -60,6 +60,7 @@
   virtual KJS::Interpreter *interpreter();
 
   virtual void setDebugEnabled(bool enabled);
+  virtual bool debugEnabled() const;
   virtual void showDebugWindow(bool show=true);
   virtual bool paused() const;
   virtual void dataReceived();
@@ -279,6 +280,15 @@
 #endif
 }
 
+bool KJSProxyImpl::debugEnabled() const
+{
+#ifdef KJS_DEBUGGER
+  return m_debugEnabled;
+#else
+  return false;
+#endif
+}
+
 void KJSProxyImpl::showDebugWindow(bool /*show*/)
 {
 #ifdef KJS_DEBUGGER
--- branches/KDE/4.1/kdelibs/khtml/ecma/kjs_proxy.h #854182:854183
@@ -62,6 +62,7 @@
   virtual KJS::Interpreter *interpreter() = 0;
 
   virtual void setDebugEnabled(bool enabled) = 0;
+  virtual bool debugEnabled() const = 0;
   virtual void showDebugWindow(bool show=true) = 0;
   virtual bool paused() const = 0;
   virtual void dataReceived() = 0;
[prev in list] [next in list] [prev in thread] [next in thread] 

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