70 lines
2.2 KiB
Diff
70 lines
2.2 KiB
Diff
|
Index: khtml/ecma/kjs_proxy.h
|
||
|
===================================================================
|
||
|
--- khtml/ecma/kjs_proxy.h (Revision 854182)
|
||
|
+++ khtml/ecma/kjs_proxy.h (Revision 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;
|
||
|
Index: khtml/ecma/kjs_events.cpp
|
||
|
===================================================================
|
||
|
--- khtml/ecma/kjs_events.cpp (Revision 854182)
|
||
|
+++ khtml/ecma/kjs_events.cpp (Revision 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());
|
||
|
Index: khtml/ecma/kjs_proxy.cpp
|
||
|
===================================================================
|
||
|
--- khtml/ecma/kjs_proxy.cpp (Revision 854182)
|
||
|
+++ khtml/ecma/kjs_proxy.cpp (Revision 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
|