+2006-06-19 Alexey Proskuryakov <ap@nypop.com>
+
+ 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 <ap@nypop.com>
Reviewed by Darin.
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)
// 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)