[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kdecker
kdecker at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:52:19 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 7041453d4329e6a1da395ccfd3f2efb5e554fede
Author: kdecker <kdecker at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jul 22 23:43:29 2004 +0000
Reviewed by Darin
Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions).
* khtml/ecma/kjs_events.cpp:
(JSLazyEventListener::JSLazyEventListener):
(JSLazyEventListener::parseCode):
* khtml/ecma/kjs_events.h:
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::createHTMLEventHandler):
* khtml/ecma/kjs_window.cpp:
(Window::getJSLazyEventListener):
* khtml/ecma/kjs_window.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 737a00e..58220ec 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2004-07-22 Kevin Decker <kdecker at apple.com>
+
+ Reviewed by Darin
+
+ Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions).
+
+ * khtml/ecma/kjs_events.cpp:
+ (JSLazyEventListener::JSLazyEventListener):
+ (JSLazyEventListener::parseCode):
+ * khtml/ecma/kjs_events.h:
+ * khtml/ecma/kjs_proxy.cpp:
+ (KJSProxyImpl::createHTMLEventHandler):
+ * khtml/ecma/kjs_window.cpp:
+ (Window::getJSLazyEventListener):
+ * khtml/ecma/kjs_window.h:
+
2004-07-22 Ken Kocienda <kocienda at apple.com>
Reviewed by Hyatt
diff --git a/WebCore/khtml/ecma/kjs_events.cpp b/WebCore/khtml/ecma/kjs_events.cpp
index 2334c97..80d85f7 100644
--- a/WebCore/khtml/ecma/kjs_events.cpp
+++ b/WebCore/khtml/ecma/kjs_events.cpp
@@ -154,11 +154,12 @@ Object JSEventListener::listenerObj() const
return listener;
}
-JSLazyEventListener::JSLazyEventListener(QString _code, const Object &_win, bool _html)
+JSLazyEventListener::JSLazyEventListener(QString _code, const Object &_win, bool _html, int lineno)
: JSEventListener(Object(), _win, _html),
code(_code),
parsed(false)
{
+ lineNumber = lineno;
}
void JSLazyEventListener::handleEvent(DOM::Event &evt, bool isWindowEvent)
@@ -188,18 +189,16 @@ void JSLazyEventListener::parseCode() const
KJS::ScriptInterpreter *interpreter = static_cast<KJS::ScriptInterpreter *>(proxy->interpreter());
ExecState *exec = interpreter->globalExec();
-
KJS::Interpreter::lock();
-
//KJS::Constructor constr(KJS::Global::current().get("Function").imp());
KJS::Object constr = interpreter->builtinFunction();
KJS::List args;
static ProtectedValue eventString = KJS::String("event");
-
+ UString sourceURL(part->m_url.url());
args.append(eventString);
args.append(KJS::String(code));
- listener = constr.construct(exec, args); // ### is globalExec ok ?
+ listener = constr.construct(exec, args, sourceURL, lineNumber); // ### is globalExec ok ?
KJS::Interpreter::unlock();
diff --git a/WebCore/khtml/ecma/kjs_events.h b/WebCore/khtml/ecma/kjs_events.h
index 256b8de..bfd7e4f 100644
--- a/WebCore/khtml/ecma/kjs_events.h
+++ b/WebCore/khtml/ecma/kjs_events.h
@@ -50,14 +50,16 @@ namespace KJS {
class JSLazyEventListener : public JSEventListener {
public:
- JSLazyEventListener(QString _code, const Object &_win, bool _html = false);
+ JSLazyEventListener(QString _code, const Object &_win, bool _html = false, int lineno = 0);
virtual void handleEvent(DOM::Event &evt, bool isWindowEvent);
Object listenerObj() const;
+
private:
void parseCode() const;
mutable QString code;
mutable bool parsed;
+ int lineNumber;
};
diff --git a/WebCore/khtml/ecma/kjs_proxy.cpp b/WebCore/khtml/ecma/kjs_proxy.cpp
index 919e373..f6a4186 100644
--- a/WebCore/khtml/ecma/kjs_proxy.cpp
+++ b/WebCore/khtml/ecma/kjs_proxy.cpp
@@ -172,8 +172,7 @@ DOM::EventListener *KJSProxyImpl::createHTMLEventHandler(QString sourceUrl, QStr
#endif
initScript();
-
- return KJS::Window::retrieveWindow(m_part)->getJSLazyEventListener(code,true);
+ return KJS::Window::retrieveWindow(m_part)->getJSLazyEventListener(code,true,m_handlerLineno);
}
void KJSProxyImpl::finishedWithEvent(const DOM::Event &event)
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index bc3587a..a0b5ccd 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1100,9 +1100,9 @@ JSEventListener *Window::getJSEventListener(const Value& val, bool html)
return new JSEventListener(Object(listenerObject), Object(this), html);
}
-JSLazyEventListener *Window::getJSLazyEventListener(const QString& code, bool html)
+JSLazyEventListener *Window::getJSLazyEventListener(const QString& code, bool html, int lineNumber)
{
- return new JSLazyEventListener(code, Object(this), html);
+ return new JSLazyEventListener(code, Object(this), html, lineNumber);
}
void Window::clear( ExecState *exec )
diff --git a/WebCore/khtml/ecma/kjs_window.h b/WebCore/khtml/ecma/kjs_window.h
index f25c29b..10c7bdd 100644
--- a/WebCore/khtml/ecma/kjs_window.h
+++ b/WebCore/khtml/ecma/kjs_window.h
@@ -103,7 +103,7 @@ namespace KJS {
Location *location() const;
Selection *selection() const;
JSEventListener *getJSEventListener(const Value &val, bool html = false);
- JSLazyEventListener *getJSLazyEventListener(const QString &code, bool html = false);
+ JSLazyEventListener *getJSLazyEventListener(const QString &code, bool html = false, int lineno = 0);
void clear( ExecState *exec );
virtual UString toString(ExecState *exec) const;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list