Commit 7d328d5f authored by cwzwarich@webkit.org's avatar cwzwarich@webkit.org
Browse files

2008-10-31 Cameron Zwarich <zwarich@apple.com>

        Reviewed by Darin Adler.

        Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console
        <https://bugs.webkit.org/show_bug.cgi?id=22019>

        The JSC::Interpreter::shouldPrintExceptions() function is not used at
        all in JavaScriptCore, so it should be moved to WebCore::Console, its
        only user.

        JavaScriptCore:

        * JavaScriptCore.exp:
        * kjs/interpreter.cpp:
        * kjs/interpreter.h:

        WebCore:

        * WebCore.base.exp:
        * page/Console.cpp:
        (WebCore::printToStandardOut):
        (WebCore::Console::shouldPrintExceptions):
        (WebCore::Console::setShouldPrintExceptions):
        * page/Console.h:

        WebKit/mac:

        * Misc/WebCoreStatistics.mm:
        (+[WebCoreStatistics shouldPrintExceptions]):
        (+[WebCoreStatistics setShouldPrintExceptions:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 354387a2
2008-10-31 Cameron Zwarich <zwarich@apple.com>
Reviewed by Darin Adler.
Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console
<https://bugs.webkit.org/show_bug.cgi?id=22019>
The JSC::Interpreter::shouldPrintExceptions() function is not used at
all in JavaScriptCore, so it should be moved to WebCore::Console, its
only user.
* JavaScriptCore.exp:
* kjs/interpreter.cpp:
* kjs/interpreter.h:
2008-10-31 Cameron Zwarich <zwarich@apple.com>
 
Not reviewed.
......
......@@ -100,8 +100,6 @@ __ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeE
__ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeEPKc
__ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeERKNS_7UStringE
__ZN3JSC11Interpreter11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeE
__ZN3JSC11Interpreter21shouldPrintExceptionsEv
__ZN3JSC11Interpreter24setShouldPrintExceptionsEb
__ZN3JSC11Interpreter8evaluateEPNS_9ExecStateERNS_10ScopeChainERKNS_10SourceCodeEPNS_7JSValueE
__ZN3JSC11JSImmediate12nonInlineNaNEv
__ZN3JSC11JSImmediate8toObjectEPNS_7JSValueEPNS_9ExecStateE
......
......@@ -75,16 +75,4 @@ Completion Interpreter::evaluate(ExecState* exec, ScopeChain& scopeChain, const
return Completion(Normal, result);
}
static bool printExceptions = false;
bool Interpreter::shouldPrintExceptions()
{
return printExceptions;
}
void Interpreter::setShouldPrintExceptions(bool print)
{
printExceptions = print;
}
} // namespace JSC
......@@ -61,9 +61,6 @@ namespace JSC {
* @return A completion object representing the result of the execution.
*/
static Completion evaluate(ExecState*, ScopeChain&, const SourceCode&, JSValue* thisValue = noValue());
static bool shouldPrintExceptions();
static void setShouldPrintExceptions(bool);
};
} // namespace JSC
......
2008-10-31 Cameron Zwarich <zwarich@apple.com>
Reviewed by Darin Adler.
Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console
<https://bugs.webkit.org/show_bug.cgi?id=22019>
* WebCore.base.exp:
* page/Console.cpp:
(WebCore::printToStandardOut):
(WebCore::Console::shouldPrintExceptions):
(WebCore::Console::setShouldPrintExceptions):
* page/Console.h:
2008-10-31 Dan Bernstein <mitz@apple.com>
 
Reviewed by John Sullivan.
......
......@@ -274,6 +274,8 @@ __ZN7WebCore13TypingCommand39insertParagraphSeparatorInQuotedContentEPNS_8Docume
__ZN7WebCore13toDeviceSpaceERKNS_9FloatRectEP8NSWindow
__ZN7WebCore13toJSDOMWindowEPNS_5FrameE
__ZN7WebCore14CachedResource12removeClientEPNS_20CachedResourceClientE
__ZN7WebCore7Console21shouldPrintExceptionsEv
__ZN7WebCore7Console24setShouldPrintExceptionsEb
__ZN7WebCore14DocumentLoader13attachToFrameEv
__ZN7WebCore14DocumentLoader15detachFromFrameEv
__ZN7WebCore14DocumentLoader18addArchiveResourceEN3WTF10PassRefPtrINS_15ArchiveResourceEEE
......
......@@ -118,7 +118,7 @@ static void printMessageSourceAndLevelPrefix(MessageSource source, MessageLevel
static void printToStandardOut(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber)
{
if (!Interpreter::shouldPrintExceptions())
if (!Console::shouldPrintExceptions())
return;
printSourceURLAndLine(sourceURL, lineNumber);
......@@ -129,7 +129,7 @@ static void printToStandardOut(MessageSource source, MessageLevel level, const S
static void printToStandardOut(MessageLevel level, ExecState* exec, const ArgList& args, const KURL& url)
{
if (!Interpreter::shouldPrintExceptions())
if (!Console::shouldPrintExceptions())
return;
printSourceURLAndLine(url.prettyURL(), 0);
......@@ -459,6 +459,18 @@ void Console::reportCurrentException(ExecState* exec)
reportException(exec, exception);
}
static bool printExceptions = false;
bool Console::shouldPrintExceptions()
{
return printExceptions;
}
void Console::setShouldPrintExceptions(bool print)
{
printExceptions = print;
}
Page* Console::page() const
{
if (!m_frame)
......
......@@ -96,8 +96,12 @@ namespace WebCore {
void reportException(JSC::ExecState*, JSC::JSValue*);
void reportCurrentException(JSC::ExecState*);
static bool shouldPrintExceptions();
static void setShouldPrintExceptions(bool);
const ProfilesArray& profiles() const { return m_profiles; }
#endif
private:
inline Page* page() const;
......
2008-10-31 Cameron Zwarich <zwarich@apple.com>
Reviewed by Darin Adler.
Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console
<https://bugs.webkit.org/show_bug.cgi?id=22019>
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics shouldPrintExceptions]):
(+[WebCoreStatistics setShouldPrintExceptions:]):
2008-10-31 Dan Bernstein <mitz@apple.com>
Reviewed by John Sullivan.
......
......@@ -30,8 +30,8 @@
#import "WebCache.h"
#import "WebFrameInternal.h"
#import <kjs/interpreter.h>
#import <kjs/JSLock.h>
#import <WebCore/Console.h>
#import <WebCore/FontCache.h>
#import <WebCore/Frame.h>
#import <WebCore/GCController.h>
......@@ -143,13 +143,13 @@ using namespace WebCore;
+ (BOOL)shouldPrintExceptions
{
JSLock lock(false);
return Interpreter::shouldPrintExceptions();
return Console::shouldPrintExceptions();
}
+ (void)setShouldPrintExceptions:(BOOL)print
{
JSLock lock(false);
Interpreter::setShouldPrintExceptions(print);
Console::setShouldPrintExceptions(print);
}
+ (void)emptyCache
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment