From c53088d91568663015e689a95c7d99f54d8af3a1 Mon Sep 17 00:00:00 2001 From: ap Date: Mon, 19 Jun 2006 16:42:35 +0000 Subject: [PATCH] Reviewed by Darin. - http://bugzilla.opendarwin.org/show_bug.cgi?id=9492 Fix or remove window.debug. It was only available in newly created windows, and became undefined after changing the URL or reloading. Let's try removing it; hopefully, no-one will notice. * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::initScriptIfNeeded): Don't add window.debug. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14912 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 13 +++++++++++++ WebCore/bindings/js/kjs_proxy.cpp | 20 -------------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index c59bea70dd04..ea0930dafb99 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2006-06-19 Alexey Proskuryakov + + Reviewed by Darin. + + - http://bugzilla.opendarwin.org/show_bug.cgi?id=9492 + Fix or remove window.debug. + + It was only available in newly created windows, and became undefined after changing the URL + or reloading. Let's try removing it; hopefully, no-one will notice. + + * bindings/js/kjs_proxy.cpp: + (WebCore::KJSProxy::initScriptIfNeeded): Don't add window.debug. + 2006-06-19 Alexey Proskuryakov Reviewed by Darin. diff --git a/WebCore/bindings/js/kjs_proxy.cpp b/WebCore/bindings/js/kjs_proxy.cpp index 18a45856e72b..e13a152db0c4 100644 --- a/WebCore/bindings/js/kjs_proxy.cpp +++ b/WebCore/bindings/js/kjs_proxy.cpp @@ -126,25 +126,6 @@ ScriptInterpreter* KJSProxy::interpreter() return m_script; } -// Implementation of the debug() function -class TestFunctionImp : public DOMObject { -public: - TestFunctionImp(ExecState*); - virtual bool implementsCall() const { return true; } - virtual JSValue* callAsFunction(ExecState*, JSObject*, const List& args); -}; - -TestFunctionImp::TestFunctionImp(ExecState* exec) -{ - setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype()); -} - -JSValue *TestFunctionImp::callAsFunction(ExecState* exec, JSObject*, const List& args) -{ - fprintf(stderr,"--> %s\n", args[0]->toString(exec).ascii()); - return jsUndefined(); -} - void KJSProxy::initScriptIfNeeded() { if (m_script) @@ -156,7 +137,6 @@ void KJSProxy::initScriptIfNeeded() // Create a KJS interpreter for this frame m_script = new ScriptInterpreter(globalObject, m_frame); - globalObject->put(m_script->globalExec(), "debug", new TestFunctionImp(m_script->globalExec()), Internal); String userAgent = m_frame->userAgent(); if (userAgent.find("Microsoft") >= 0 || userAgent.find("MSIE") >= 0) -- 2.36.0