[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:41:59 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c9953bfd7e94e872e68a31948a28b339c898c7d0
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue May 13 21:19:57 2003 +0000
JavaScriptCore:
Reviewed by Darin.
- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
- improved JavaScript error message format
* kjs/error_object.cpp:
(ErrorProtoFuncImp::call): Include line number in toString output.
* kjs/internal.cpp:
(Parser::parse): Remove redundant fprintf.
* kjs/interpreter.cpp:
(Interpreter::evaluate): Log if the flag is on. Include filename in log output.
(Interpreter::shouldPrintExceptions): Check the global flag.
(Interpreter::setShouldPrintExceptions): Set the global flag.
* kjs/interpreter.h:
* kjs/nodes.cpp:
(Node::throwError): Add variants that include value and expression or label in format.
(NewExprNode::evaluate): Improve error message.
(FunctionCallNode::evaluate): Improve error message.
(RelationalNode::evaluate): Improve error message.
(ContinueNode::execute): Improve error message.
(BreakNode::execute): Improve error message.
(LabelNode::execute): Improve error message.
* kjs/nodes.h:
WebCore:
Reviewed by Darin.
- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::evaluate): Pass the filename.
* kwq/WebCoreJavaScript.h:
* kwq/WebCoreJavaScript.mm:
(+[WebCoreJavaScript shouldPrintExceptions]): Call through to JavaScriptCore.
(+[WebCoreJavaScript setShouldPrintExceptions:]): Call through to JavaScriptCore.
* khtml/ecma/kjs_events.cpp:
(JSEventListener::handleEvent): Print exception if there is one.
* khtml/ecma/kjs_window.cpp:
(ScheduledAction::execute): Print exception in the function case.
WebKit:
Reviewed by Darin.
- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
* Misc.subproj/WebCoreStatistics.h:
* Misc.subproj/WebCoreStatistics.m:
(+[WebCoreStatistics shouldPrintExceptions]): Call through to WebCore.
(+[WebCoreStatistics setShouldPrintExceptions:]): Call through to WebCore.
WebBrowser:
Reviewed by Darin.
- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
* Debug/DebugUtilities.m:
(-[DebugUtilities createDebugMenu]): Include "Log JavaScript Exceptions" item.
(-[BrowserDocument toggleLogJavaScriptExceptions:]): Call WebKit to do the toggle.
(-[BrowserDocument validate_toggleLogJavaScriptExceptions:]): Set state properly.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 5740e1b..79d6338 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,29 @@
+2003-05-12 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
+ - improved JavaScript error message format
+
+ * kjs/error_object.cpp:
+ (ErrorProtoFuncImp::call): Include line number in toString output.
+ * kjs/internal.cpp:
+ (Parser::parse): Remove redundant fprintf.
+ * kjs/interpreter.cpp:
+ (Interpreter::evaluate): Log if the flag is on. Include filename in log output.
+ (Interpreter::shouldPrintExceptions): Check the global flag.
+ (Interpreter::setShouldPrintExceptions): Set the global flag.
+ * kjs/interpreter.h:
+ * kjs/nodes.cpp:
+ (Node::throwError): Add variants that include value and expression or label in format.
+ (NewExprNode::evaluate): Improve error message.
+ (FunctionCallNode::evaluate): Improve error message.
+ (RelationalNode::evaluate): Improve error message.
+ (ContinueNode::execute): Improve error message.
+ (BreakNode::execute): Improve error message.
+ (LabelNode::execute): Improve error message.
+ * kjs/nodes.h:
+
=== Safari-78 ===
2003-05-07 Vicki Murley <vicki at apple.com>
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index 5740e1b..79d6338 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,3 +1,29 @@
+2003-05-12 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
+ - improved JavaScript error message format
+
+ * kjs/error_object.cpp:
+ (ErrorProtoFuncImp::call): Include line number in toString output.
+ * kjs/internal.cpp:
+ (Parser::parse): Remove redundant fprintf.
+ * kjs/interpreter.cpp:
+ (Interpreter::evaluate): Log if the flag is on. Include filename in log output.
+ (Interpreter::shouldPrintExceptions): Check the global flag.
+ (Interpreter::setShouldPrintExceptions): Set the global flag.
+ * kjs/interpreter.h:
+ * kjs/nodes.cpp:
+ (Node::throwError): Add variants that include value and expression or label in format.
+ (NewExprNode::evaluate): Improve error message.
+ (FunctionCallNode::evaluate): Improve error message.
+ (RelationalNode::evaluate): Improve error message.
+ (ContinueNode::execute): Improve error message.
+ (BreakNode::execute): Improve error message.
+ (LabelNode::execute): Improve error message.
+ * kjs/nodes.h:
+
=== Safari-78 ===
2003-05-07 Vicki Murley <vicki at apple.com>
diff --git a/JavaScriptCore/kjs/error_object.cpp b/JavaScriptCore/kjs/error_object.cpp
index fd368e9..669a5f8 100644
--- a/JavaScriptCore/kjs/error_object.cpp
+++ b/JavaScriptCore/kjs/error_object.cpp
@@ -64,16 +64,22 @@ bool ErrorProtoFuncImp::implementsCall() const
Value ErrorProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &/*args*/)
{
// toString()
- UString s = "Error";
+ UString s;
- Value v = thisObj.get(exec, namePropertyName);
+ Value v = thisObj.get(exec, "line");
if (v.type() != UndefinedType) {
- s = v.toString(exec);
+ s += v.toString(exec) += ": ";
+ }
+
+
+ v = thisObj.get(exec, namePropertyName);
+ if (v.type() != UndefinedType) {
+ s += v.toString(exec);
}
v = thisObj.get(exec, messagePropertyName);
if (v.type() != UndefinedType) {
- s += ": "+v.toString(exec);
+ s += " - " + v.toString(exec);
}
return String(s);
diff --git a/JavaScriptCore/kjs/internal.cpp b/JavaScriptCore/kjs/internal.cpp
index 95834c6..4ed1e4b 100644
--- a/JavaScriptCore/kjs/internal.cpp
+++ b/JavaScriptCore/kjs/internal.cpp
@@ -455,9 +455,6 @@ ProgramNode *Parser::parse(const UChar *code, unsigned int length, int *sourceId
*errLine = eline;
if (errMsg)
*errMsg = "Parse error at line " + UString::from(eline);
-#ifndef NDEBUG
- fprintf(stderr, "KJS: JavaScript parse error at line %d.\n", eline);
-#endif
delete prog;
return 0;
}
diff --git a/JavaScriptCore/kjs/interpreter.cpp b/JavaScriptCore/kjs/interpreter.cpp
index e3672ad..e5b6cbb 100644
--- a/JavaScriptCore/kjs/interpreter.cpp
+++ b/JavaScriptCore/kjs/interpreter.cpp
@@ -115,17 +115,22 @@ bool Interpreter::checkSyntax(const UString &code)
return rep->checkSyntax(code);
}
-Completion Interpreter::evaluate(const UString &code, const Value &thisV)
+Completion Interpreter::evaluate(const UString &code, const Value &thisV, const UString &filename)
{
Completion comp = rep->evaluate(code,thisV);
-#ifndef NDEBUG
- if (comp.complType() == Throw) {
+
+#if APPLE_CHANGES
+ if (shouldPrintExceptions() && comp.complType() == Throw) {
lock();
ExecState *exec = rep->globalExec();
- printf("Uncaught exception: %s\n", comp.value().toObject(exec).toString(exec).ascii());
+ char *f = strdup(filename.ascii());
+ const char *message = comp.value().toObject(exec).toString(exec).ascii();
+ printf("%s:%s\n", f, message);
+ free(f);
unlock();
}
#endif
+
return comp;
}
@@ -312,5 +317,19 @@ void Interpreter::finalCheck()
}
#endif
+#if APPLE_CHANGES
+static bool printExceptions = false;
+
+bool Interpreter::shouldPrintExceptions()
+{
+ return printExceptions;
+}
+
+void Interpreter::setShouldPrintExceptions(bool print)
+{
+ printExceptions = print;
+}
+#endif
+
void Interpreter::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
diff --git a/JavaScriptCore/kjs/interpreter.h b/JavaScriptCore/kjs/interpreter.h
index 859476e..5c00805 100644
--- a/JavaScriptCore/kjs/interpreter.h
+++ b/JavaScriptCore/kjs/interpreter.h
@@ -186,7 +186,7 @@ namespace KJS {
* execution. This should either be Null() or an Object.
* @return A completion object representing the result of the execution.
*/
- Completion evaluate(const UString &code, const Value &thisV = Value());
+ Completion evaluate(const UString &code, const Value &thisV = Value(), const UString &filename = UString());
/**
* @internal
@@ -338,6 +338,12 @@ namespace KJS {
*/
static void finalCheck();
#endif
+
+#if APPLE_CHANGES
+ static bool shouldPrintExceptions();
+ static void setShouldPrintExceptions(bool);
+#endif
+
private:
InterpreterImp *rep;
diff --git a/JavaScriptCore/kjs/nodes.cpp b/JavaScriptCore/kjs/nodes.cpp
index b31e3cd..7c85b23 100644
--- a/JavaScriptCore/kjs/nodes.cpp
+++ b/JavaScriptCore/kjs/nodes.cpp
@@ -130,6 +130,37 @@ Value Node::throwError(ExecState *exec, ErrorType e, const char *msg)
return err;
}
+Value Node::throwError(ExecState *exec, ErrorType e, const char *msg, Value v, Node *expr)
+{
+ char *vStr = strdup(v.toString(exec).ascii());
+ char *exprStr = strdup(expr->toString().ascii());
+
+ int length = strlen(msg) - 4 /* two %s */ + strlen(vStr) + strlen(exprStr) + 1 /* null terminator */;
+ char *str = new char[length];
+ sprintf(str, msg, vStr, exprStr);
+ free(vStr);
+ free(exprStr);
+
+ Value result = throwError(exec, e, str);
+ delete [] str;
+
+ return result;
+}
+
+
+Value Node::throwError(ExecState *exec, ErrorType e, const char *msg, Identifier label)
+{
+ const char *l = label.ascii();
+ int length = strlen(msg) - 2 /* %s */ + strlen(l) + 1 /* null terminator */;
+ char *message = new char[length];
+ sprintf(message, msg, l);
+
+ Value result = throwError(exec, e, message);
+ delete [] message;
+
+ return result;
+}
+
// ------------------------------ StatementNode --------------------------------
StatementNode::StatementNode() : l0(-1), l1(-1), sid(-1), breakPoint(false)
{
@@ -657,12 +688,12 @@ Value NewExprNode::evaluate(ExecState *exec)
}
if (v.type() != ObjectType) {
- return throwError(exec, TypeError, "Value used with new is not object.");
+ return throwError(exec, TypeError, "Value %s (result of expression %s) is not an object. Cannot be used with new.", v, expr);
}
Object constr = Object(static_cast<ObjectImp*>(v.imp()));
if (!constr.implementsConstruct()) {
- return throwError(exec, TypeError, "Value asked to construct is not a constructor.");
+ return throwError(exec, TypeError, "Value %s (result of expression %s) is not a constructor. Cannot be used with new.", v, expr);
}
Value res = constr.construct(exec,argList);
@@ -703,28 +734,19 @@ Value FunctionCallNode::evaluate(ExecState *exec)
Value v = ref.getValue(exec);
if (v.type() != ObjectType) {
-#ifndef NDEBUG
- printInfo(exec, "WARNING: Failed function call attempt on", v, line);
-#endif
- return throwError(exec, TypeError, "Value is not object. Cannot be called.");
+ return throwError(exec, TypeError, "Value %s (result of expression %s) is not object. Cannot be called.", v, expr);
}
Object func = Object(static_cast<ObjectImp*>(v.imp()));
if (!func.implementsCall()) {
-#ifndef NDEBUG
- printInfo(exec, "Failed function call attempt on", v, line);
-#endif
- return throwError(exec, TypeError, "Object does not allow calls.");
+ return throwError(exec, TypeError, "Object %s (result of expression %s) does not allow calls.", v, expr);
}
#if KJS_MAX_STACK > 0
static int depth = 0; // sum of all concurrent interpreters
if (++depth > KJS_MAX_STACK) {
-#ifndef NDEBUG
- printInfo(exec, "Exceeded maximum function call depth", v, line);
-#endif
- return throwError(exec, RangeError, "Exceeded maximum function call depth.");
+ return throwError(exec, RangeError, "Exceeded maximum function call depth calling %s (result of expression %s).", v, expr);
}
#endif
@@ -1191,13 +1213,13 @@ Value RelationalNode::evaluate(ExecState *exec)
// Is all of this OK for host objects?
if (v2.type() != ObjectType)
return throwError(exec, TypeError,
- "Used IN expression with non-object." );
+ "Value %s (result of expression %s) is not an object. Cannot be used with IN expression.", v2, expr2);
Object o2(static_cast<ObjectImp*>(v2.imp()));
b = o2.hasProperty(exec, Identifier(v1.toString(exec)));
} else {
if (v2.type() != ObjectType)
return throwError(exec, TypeError,
- "Used instanceof operator on non-object." );
+ "Value %s (result of expression %s) is not an object. Cannot be used with instanceof operator.", v2, expr2);
Object o2(static_cast<ObjectImp*>(v2.imp()));
if (!o2.implementsHasInstance()) {
@@ -2147,9 +2169,9 @@ Completion ContinueNode::execute(ExecState *exec)
Value dummy;
return exec->context().imp()->seenLabels()->contains(ident) ?
- Completion(Continue, dummy, ident) :
+ Completion(Break, dummy, ident) :
Completion(Throw,
- throwError(exec, SyntaxError, "Label not found in containing block"));
+ throwError(exec, SyntaxError, "Label %s not found in containing block. Can't continue.", ident));
}
// ------------------------------ BreakNode ------------------------------------
@@ -2163,7 +2185,7 @@ Completion BreakNode::execute(ExecState *exec)
return exec->context().imp()->seenLabels()->contains(ident) ?
Completion(Break, dummy, ident) :
Completion(Throw,
- throwError(exec, SyntaxError, "Label not found in containing block"));
+ throwError(exec, SyntaxError, "Label %s not found in containing block. Can't break.", ident));
}
// ------------------------------ ReturnNode -----------------------------------
@@ -2518,7 +2540,7 @@ Completion LabelNode::execute(ExecState *exec)
if (!exec->context().imp()->seenLabels()->push(label)) {
return Completion( Throw,
- throwError(exec, SyntaxError, "Duplicated label found" ));
+ throwError(exec, SyntaxError, "Duplicated label %s found.", label));
};
e = statement->execute(exec);
exec->context().imp()->seenLabels()->pop();
diff --git a/JavaScriptCore/kjs/nodes.h b/JavaScriptCore/kjs/nodes.h
index c586939..fd7255f 100644
--- a/JavaScriptCore/kjs/nodes.h
+++ b/JavaScriptCore/kjs/nodes.h
@@ -99,6 +99,8 @@ namespace KJS {
#endif
protected:
Value throwError(ExecState *exec, ErrorType e, const char *msg);
+ Value throwError(ExecState *exec, ErrorType e, const char *msg, Value v, Node *expr);
+ Value throwError(ExecState *exec, ErrorType e, const char *msg, Identifier label);
int line;
unsigned int refcount;
virtual int sourceId() const { return -1; }
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 9984d75..b34f677 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,20 @@
+2003-05-12 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
+
+ * khtml/ecma/kjs_proxy.cpp:
+ (KJSProxyImpl::evaluate): Pass the filename.
+ * kwq/WebCoreJavaScript.h:
+ * kwq/WebCoreJavaScript.mm:
+ (+[WebCoreJavaScript shouldPrintExceptions]): Call through to JavaScriptCore.
+ (+[WebCoreJavaScript setShouldPrintExceptions:]): Call through to JavaScriptCore.
+ * khtml/ecma/kjs_events.cpp:
+ (JSEventListener::handleEvent): Print exception if there is one.
+ * khtml/ecma/kjs_window.cpp:
+ (ScheduledAction::execute): Print exception in the function case.
+
2003-05-13 Darin Adler <darin at apple.com>
Reviewed by Ken.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 9984d75..b34f677 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,20 @@
+2003-05-12 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
+
+ * khtml/ecma/kjs_proxy.cpp:
+ (KJSProxyImpl::evaluate): Pass the filename.
+ * kwq/WebCoreJavaScript.h:
+ * kwq/WebCoreJavaScript.mm:
+ (+[WebCoreJavaScript shouldPrintExceptions]): Call through to JavaScriptCore.
+ (+[WebCoreJavaScript setShouldPrintExceptions:]): Call through to JavaScriptCore.
+ * khtml/ecma/kjs_events.cpp:
+ (JSEventListener::handleEvent): Print exception if there is one.
+ * khtml/ecma/kjs_window.cpp:
+ (ScheduledAction::execute): Print exception in the function case.
+
2003-05-13 Darin Adler <darin at apple.com>
Reviewed by Ken.
diff --git a/WebCore/khtml/ecma/kjs_events.cpp b/WebCore/khtml/ecma/kjs_events.cpp
index 52fe4c0..03d0159 100644
--- a/WebCore/khtml/ecma/kjs_events.cpp
+++ b/WebCore/khtml/ecma/kjs_events.cpp
@@ -97,8 +97,19 @@ void JSEventListener::handleEvent(DOM::Event &evt, bool isWindowEvent)
window->setCurrentEvent( 0 );
interpreter->setCurrentEvent( 0 );
+#if APPLE_CHANGES
+ if ( exec->hadException() ) {
+ if (Interpreter::shouldPrintExceptions()) {
+ char *message = exec->exception().toObject(exec).get(exec, messagePropertyName).toString(exec).ascii();
+ printf("(event handler):%s\n", message);
+ }
+ exec->clearException();
+ }
+#else
if ( exec->hadException() )
exec->clearException();
+#endif
+
else if (html)
{
QVariant ret = ValueToVariant(exec, retval);
diff --git a/WebCore/khtml/ecma/kjs_proxy.cpp b/WebCore/khtml/ecma/kjs_proxy.cpp
index 50ccc7b..b6a66bc 100644
--- a/WebCore/khtml/ecma/kjs_proxy.cpp
+++ b/WebCore/khtml/ecma/kjs_proxy.cpp
@@ -114,7 +114,7 @@ QVariant KJSProxyImpl::evaluate(QString filename, int baseLine,
KJS::Value thisNode = n.isNull() ? Window::retrieve( m_part ) : getDOMNode(m_script->globalExec(),n);
UString code( str );
- Completion comp = m_script->evaluate(code, thisNode);
+ Completion comp = m_script->evaluate(code, thisNode, filename);
bool success = ( comp.complType() == Normal ) || ( comp.complType() == ReturnValue );
#ifdef KJS_DEBUGGER
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 5d71f90..56cb7cd 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1555,6 +1555,15 @@ void ScheduledAction::execute(Window *window)
Q_ASSERT( window == interpreter->globalObject().imp() );
Object obj( window );
func.call(exec,obj,args); // note that call() creates its own execution state for the func call
+ if ( exec->hadException() ) {
+#if APPLE_CHANGES
+ if (Interpreter::shouldPrintExceptions()) {
+ char *message = exec->exception().toObject(exec).get(exec, messagePropertyName).toString(exec).ascii();
+ printf("(timer):%s\n", message);
+ }
+#endif
+ exec->clearException();
+ }
}
}
}
diff --git a/WebCore/kwq/WebCoreJavaScript.h b/WebCore/kwq/WebCoreJavaScript.h
index 3ca9a7e..b6edf87 100644
--- a/WebCore/kwq/WebCoreJavaScript.h
+++ b/WebCore/kwq/WebCoreJavaScript.h
@@ -38,4 +38,7 @@
+ (void)garbageCollect;
++ (BOOL)shouldPrintExceptions;
++ (void)setShouldPrintExceptions:(BOOL)print;
+
@end
diff --git a/WebCore/kwq/WebCoreJavaScript.mm b/WebCore/kwq/WebCoreJavaScript.mm
index e3c0823..3214272 100644
--- a/WebCore/kwq/WebCoreJavaScript.mm
+++ b/WebCore/kwq/WebCoreJavaScript.mm
@@ -26,8 +26,10 @@
#import "WebCoreJavaScript.h"
#import <JavaScriptCore/collector.h>
+#import <JavaScriptCore/interpreter.h>
using KJS::Collector;
+using KJS::Interpreter;
@implementation WebCoreJavaScript
@@ -61,4 +63,14 @@ using KJS::Collector;
while (Collector::collect()) { }
}
++ (BOOL)shouldPrintExceptions
+{
+ return Interpreter::shouldPrintExceptions();
+}
+
++ (void)setShouldPrintExceptions:(BOOL)print
+{
+ Interpreter::setShouldPrintExceptions(print);
+}
+
@end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 41c0f0b..c04e3a8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2003-05-12 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
+
+ * Misc.subproj/WebCoreStatistics.h:
+ * Misc.subproj/WebCoreStatistics.m:
+ (+[WebCoreStatistics shouldPrintExceptions]): Call through to WebCore.
+ (+[WebCoreStatistics setShouldPrintExceptions:]): Call through to WebCore.
+
2003-05-13 Darin Adler <darin at apple.com>
Reviewed by Ken.
diff --git a/WebKit/Misc.subproj/WebCoreStatistics.h b/WebKit/Misc.subproj/WebCoreStatistics.h
index 44b90eb..d34f1cd 100644
--- a/WebKit/Misc.subproj/WebCoreStatistics.h
+++ b/WebKit/Misc.subproj/WebCoreStatistics.h
@@ -25,6 +25,9 @@
+ (NSSet *)javaScriptRootObjectClasses;
+ (void)garbageCollectJavaScriptObjects;
++ (BOOL)shouldPrintExceptions;
++ (void)setShouldPrintExceptions:(BOOL)print;
+
@end
@interface WebFrame (WebKitDebug)
diff --git a/WebKit/Misc.subproj/WebCoreStatistics.m b/WebKit/Misc.subproj/WebCoreStatistics.m
index 0bb342b..286fde8 100644
--- a/WebKit/Misc.subproj/WebCoreStatistics.m
+++ b/WebKit/Misc.subproj/WebCoreStatistics.m
@@ -61,6 +61,16 @@
[WebCoreJavaScript garbageCollect];
}
++ (BOOL)shouldPrintExceptions
+{
+ return [WebCoreJavaScript shouldPrintExceptions];
+}
+
++ (void)setShouldPrintExceptions:(BOOL)print
+{
+ [WebCoreJavaScript setShouldPrintExceptions:print];
+}
+
@end
@implementation WebFrame (WebKitDebug)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list