[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:42:36 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 828fd2652e39646cfdb78e980dafe004984a8621
Author: kdecker <kdecker at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri May 28 02:06:05 2004 +0000
JavaScriptCore:
Reviewed by Ken.
-revised generated error message content
* kjs/error_object.cpp:
(ErrorProtoFuncImp::call):
* kjs/internal.cpp:
(Parser::parse):
* kjs/object.cpp:
(KJS::Error::create):
WebCore:
Reviewed by Ken.
-wired up JavaScript error message handling to
the WebCoreBridge
* khtml/ecma/kjs_events.cpp:
(JSEventListener::handleEvent):
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::evaluate):
* khtml/ecma/kjs_window.cpp:
(Window::isSafeScript):
(ScheduledAction::execute):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::addMessageToConsole):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
WebKit:
Reviewed by Ken.
-wired up JavaScript error message handling through
the WebCoreBridge
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge addMessageToConsole:]):
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/WebUIDelegatePrivate.h:
WebBrowser:
Reviewed by Ken.
-added the JavaScript Console feature
* BrowserWebController.m:
(-[BrowserWebView setWindowFocusDisabled:]):
(-[BrowserWebView webView:addMessageToConsole:]):
* Debug/DebugUtilities.m:
(-[DebugUtilities createDebugMenu]):
(-[BrowserDocument showJavaScriptConsole:]):
* WebBrowser.pbproj/project.pbxproj:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index e081cbd..4f0f892 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2004-05-27 Kevin Decker <kdecker at apple.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ * kjs/error_object.cpp:
+ (ErrorProtoFuncImp::call):
+ * kjs/internal.cpp:
+ (Parser::parse):
+ * kjs/object.cpp:
+ (KJS::Error::create):
+
=== Safari-142 ===
2004-05-27 Richard Williamson <rjw at apple.com>
diff --git a/JavaScriptCore/kjs/error_object.cpp b/JavaScriptCore/kjs/error_object.cpp
index 543f5fb..047ddd7 100644
--- a/JavaScriptCore/kjs/error_object.cpp
+++ b/JavaScriptCore/kjs/error_object.cpp
@@ -66,13 +66,7 @@ Value ErrorProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &/*ar
// toString()
UString s;
- Value v = thisObj.get(exec, "line");
- if (v.type() != UndefinedType) {
- s += v.toString(exec) += ": ";
- }
-
-
- v = thisObj.get(exec, namePropertyName);
+ Value v = thisObj.get(exec, namePropertyName);
if (v.type() != UndefinedType) {
s += v.toString(exec);
}
diff --git a/JavaScriptCore/kjs/internal.cpp b/JavaScriptCore/kjs/internal.cpp
index c95a035..8cbf2f6 100644
--- a/JavaScriptCore/kjs/internal.cpp
+++ b/JavaScriptCore/kjs/internal.cpp
@@ -462,7 +462,7 @@ ProgramNode *Parser::parse(const UChar *code, unsigned int length, int *sourceId
if (errLine)
*errLine = eline;
if (errMsg)
- *errMsg = "Parse error at line " + UString::from(eline);
+ *errMsg = "Parse error";
if (prog) {
// must ref and deref to clean up properly
prog->ref();
diff --git a/JavaScriptCore/kjs/object.cpp b/JavaScriptCore/kjs/object.cpp
index a4ebd17..6c26619 100644
--- a/JavaScriptCore/kjs/object.cpp
+++ b/JavaScriptCore/kjs/object.cpp
@@ -495,7 +495,6 @@ Object Error::create(ExecState *exec, ErrorType errtype, const char *message,
int lineno, int sourceId)
{
Object cons;
-
switch (errtype) {
case EvalError:
cons = exec->lexicalInterpreter()->builtinEvalError();
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 547d374..e3066a6 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,20 @@
+2004-05-27 Kevin Decker <kdecker at apple.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ * khtml/ecma/kjs_events.cpp:
+ (JSEventListener::handleEvent):
+ * khtml/ecma/kjs_proxy.cpp:
+ (KJSProxyImpl::evaluate):
+ * khtml/ecma/kjs_window.cpp:
+ (Window::isSafeScript):
+ (ScheduledAction::execute):
+ * kwq/KWQKHTMLPart.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::addMessageToConsole):
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm:
+
2004-05-27 Trey Matteson <trey at apple.com>
Two dragging tweaks: ondragleave events are sent before ondragenter events when
diff --git a/WebCore/khtml/ecma/kjs_events.cpp b/WebCore/khtml/ecma/kjs_events.cpp
index f7d807e..42d18d9 100644
--- a/WebCore/khtml/ecma/kjs_events.cpp
+++ b/WebCore/khtml/ecma/kjs_events.cpp
@@ -18,7 +18,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
+#include "khtml_part.h"
#include "kjs_window.h"
#include "kjs_events.h"
#include "kjs_events.lut.h"
@@ -111,10 +111,14 @@ void JSEventListener::handleEvent(DOM::Event &evt, bool isWindowEvent)
interpreter->setCurrentEvent( 0 );
#if APPLE_CHANGES
if ( exec->hadException() ) {
+ KJS::Interpreter::lock();
+ char *message = exec->exception().toObject(exec).get(exec, messagePropertyName).toString(exec).ascii();
+ int lineNumber = exec->exception().toObject(exec).get(exec, "line").toInt32(exec);
+ KJS::Interpreter::unlock();
if (Interpreter::shouldPrintExceptions()) {
- char *message = exec->exception().toObject(exec).get(exec, messagePropertyName).toString(exec).ascii();
printf("(event handler):%s\n", message);
}
+ KWQ(part)->addMessageToConsole(message, lineNumber );
exec->clearException();
}
#else
diff --git a/WebCore/khtml/ecma/kjs_proxy.cpp b/WebCore/khtml/ecma/kjs_proxy.cpp
index de89052..31f733e 100644
--- a/WebCore/khtml/ecma/kjs_proxy.cpp
+++ b/WebCore/khtml/ecma/kjs_proxy.cpp
@@ -116,8 +116,7 @@ QVariant KJSProxyImpl::evaluate(QString filename, int baseLine,
UString code( str );
Completion comp = m_script->evaluate(code, thisNode, filename);
- bool success = ( comp.complType() == Normal ) || ( comp.complType() == ReturnValue );
-
+ bool success = ( comp.complType() == Normal ) || ( comp.complType() == ReturnValue );
#ifdef KJS_DEBUGGER
// KJSDebugWin::instance()->setCode(QString::null);
#endif
@@ -131,8 +130,13 @@ QVariant KJSProxyImpl::evaluate(QString filename, int baseLine,
{
KJS::Interpreter::lock();
UString msg = comp.value().toString(m_script->globalExec());
+ int lineNumber = comp.value().toObject(m_script->globalExec()).get(m_script->globalExec(), "line").toInt32(m_script->globalExec());
KJS::Interpreter::unlock();
+#if APPLE_CHANGES
+ KWQ(m_part)->addMessageToConsole(msg.qstring(), lineNumber);
+#else
kdWarning(6070) << "Script threw exception: " << msg.qstring() << endl;
+#endif
}
return QVariant();
}
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 7036015..4ab0842 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1047,6 +1047,10 @@ bool Window::isSafeScript(ExecState *exec) const
if (Interpreter::shouldPrintExceptions()) {
printf("Unsafe JavaScript attempt to access frame with URL %s from frame with URL %s. Domains must match.\n",
thisDocument->URL().latin1(), actDocument->URL().latin1());
+ QString message;
+ message.sprintf("Unsafe JavaScript attempt to access frame with URL %s from frame with URL %s. Domains must match.\n",
+ thisDocument->URL().latin1(), actDocument->URL().latin1());
+ KWQ(m_part)->addMessageToConsole(message, 1);
}
#endif
@@ -1673,12 +1677,14 @@ void ScheduledAction::execute(Window *window)
Interpreter::unlock();
if ( exec->hadException() ) {
#if APPLE_CHANGES
+ Interpreter::lock();
+ char *message = exec->exception().toObject(exec).get(exec, messagePropertyName).toString(exec).ascii();
+ int lineNumber = exec->exception().toObject(exec).get(exec, "line").toInt32(exec);
+ Interpreter::unlock();
if (Interpreter::shouldPrintExceptions()) {
- Interpreter::lock();
- char *message = exec->exception().toObject(exec).get(exec, messagePropertyName).toString(exec).ascii();
- Interpreter::unlock();
printf("(timer):%s\n", message);
}
+ KWQ(window->m_part)->addMessageToConsole(message, lineNumber);
#endif
exec->clearException();
}
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index d474df8..9fb3766 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -179,7 +179,7 @@ public:
void runJavaScriptAlert(const QString &message);
bool runJavaScriptConfirm(const QString &message);
bool runJavaScriptPrompt(const QString &message, const QString &defaultValue, QString &result);
-
+ void KWQKHTMLPart::addMessageToConsole(const QString &message, const unsigned int lineNumber);
using KHTMLPart::xmlDocImpl;
khtml::RenderObject *renderer();
void forceLayout();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 0563f40..7adb67c 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1579,6 +1579,13 @@ bool KWQKHTMLPart::runJavaScriptPrompt(const QString &prompt, const QString &def
return false;
}
+void KWQKHTMLPart::addMessageToConsole(const QString &message, const unsigned int lineNumber)
+{
+ NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
+ message.getNSString(), @"message",[NSNumber numberWithInt: lineNumber], @"lineNumber", NULL];
+ [_bridge addMessageToConsole:dictionary];
+}
+
void KWQKHTMLPart::createEmptyDocument()
{
// Although it's not completely clear from the name of this function,
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 62e5ff5..20e4884 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -372,6 +372,7 @@ typedef enum {
- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
- (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result;
+- (void)addMessageToConsole:(NSDictionary *)message;
- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL customHeaders:(NSDictionary *)customHeaders;
- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL customHeaders:(NSDictionary *)customHeaders postData:(NSData *)data;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index a85ba78..514de7b 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -259,7 +259,6 @@ static bool initializedKJS = FALSE;
_part->provisionalLoadStarted();
}
-
- (void)openURL:(NSURL *)URL reload:(BOOL)reload contentType:(NSString *)contentType refresh:(NSString *)refresh lastModified:(NSDate *)lastModified pageCache:(NSDictionary *)pageCache
{
if (pageCache) {
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 4c7b68b..53902d7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2004-05-27 Kevin Decker <kdecker at apple.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge addMessageToConsole:]):
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/WebUIDelegatePrivate.h:
+
=== Safari-142 ===
2004-05-27 Trey Matteson <trey at apple.com>
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index f9e4c67..123ed54 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -337,6 +337,14 @@ NSString *WebPluginContainerKey = @"WebPluginContainer";
return *result != nil;
}
+- (void)addMessageToConsole:(NSDictionary *)message
+{
+ WebView *wv = [_frame webView];
+ id wd = [wv UIDelegate];
+ if ([wd respondsToSelector: @selector(webView:addMessageToConsole:)])
+ [wd webView:wv addMessageToConsole:message];
+}
+
- (NSView <WebCoreFileButton> *)fileButtonWithDelegate:(id <WebCoreFileButtonDelegate>)delegate
{
return [[WebFileButton alloc] initWithBridge:self delegate:delegate];
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 50d40f5..011829f 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -4295,8 +4295,8 @@
F5E0E10902BC45F8018635CA,
F5B36B410281DF55018635CB,
F5B36B420281DF55018635CB,
- F5B36B450281DF9C018635CB,
F5B36B460281DF9C018635CB,
+ F5B36B450281DF9C018635CB,
F5F7174C02885C5B018635CA,
F5F7174D02885C5B018635CA,
);
diff --git a/WebKit/WebView.subproj/WebUIDelegatePrivate.h b/WebKit/WebView.subproj/WebUIDelegatePrivate.h
index 78eca1a..b29226d 100644
--- a/WebKit/WebView.subproj/WebUIDelegatePrivate.h
+++ b/WebKit/WebView.subproj/WebUIDelegatePrivate.h
@@ -13,7 +13,7 @@
- (float)webViewFooterHeight:(WebView *)sender;
- (void)webView:(WebView *)sender drawHeaderInRect:(NSRect)rect;
- (void)webView:(WebView *)sender drawFooterInRect:(NSRect)rect;
-
+- (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)message;
- (BOOL)webView:(WebView *)webView shouldBeginDragForElement:(NSDictionary *)element pasteboard:(NSPasteboard *)pasteboard mouseDownEvent:(NSEvent *)mouseDownEvent mouseDraggedEvent:(NSEvent *)mouseDraggedEvent;
- (BOOL)webView:(WebView *)webView shouldDetermineDragOperationForDraggingInfo:(id <NSDraggingInfo>)draggingInfo dragOperation:(NSDragOperation *)dragOperation;
- (BOOL)webView:(WebView *)webView shouldProcessDragWithDraggingInfo:(id <NSDraggingInfo>)draggingInfo;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list