Changeset 13465 in webkit for trunk/JavaScriptCore/kjs/object.h


Ignore:
Timestamp:
Mar 23, 2006, 10:28:07 PM (19 years ago)
Author:
darin
Message:

JavaScriptCore:

Reviewed by Maciej.

  • kjs/object.h: Take function name, as well as source URL and line number, when using the special overloaded construct for making functions.
  • kjs/object.cpp: (KJS::JSObject::construct): Ditto.
  • kjs/function_object.h: Ditto.
  • kjs/function_object.cpp: (FunctionObjectImp::construct): Pass a name when constructing the function rather than null. Use "anonymous" when making a function using the default function constructor.
  • kjs/nodes2string.cpp: (FuncDeclNode::streamTo): Put a line break just before a function declaration.
  • unrelated fix
  • kxmlcore/HashMapPtrSpec.h: Add missing needed friend declaration.

LayoutTests:

  • fast/js/resources/function-names.js: Added.
  • fast/js/function-names.html: Generated.
  • fast/js/function-names-expected.txt: Generated.

WebCore:

Reviewed by Maciej.

Test: fast/js/function-names.html

  • dom/Document.h: Add function name parameter to createHTMLEventListener.
  • dom/Document.cpp: (WebCore::Document::createHTMLEventListener): Pass function name when calling createHTMLEventHandler. (WebCore::Document::setHTMLWindowEventListener): Pass attribute name as function name when calling createHTMLEventListener.
  • html/HTMLElement.cpp: (WebCore::HTMLElement::setHTMLEventListener): Pass attribute name as function name when calling createHTMLEventListener.
  • khtml/ecma/kjs_events.h: Add a function name parameter to JSLazyEventListener.
  • khtml/ecma/kjs_events.cpp: (KJS::JSLazyEventListener::JSLazyEventListener): Take and store a function name. (KJS::JSLazyEventListener::parseCode): Pass function name when constructing the function.
  • khtml/ecma/kjs_proxy.h: Add a function name parameter to createHTMLEventHandler and createSVGEventHandler.
  • khtml/ecma/kjs_proxy.cpp: (WebCore::KJSProxy::createHTMLEventHandler): Pass function name when creating a JSLazyEventListener. (WebCore::KJSProxy::createSVGEventHandler): Ditto.
  • ksvg2/events/JSSVGLazyEventListener.h: Add a function name parameter to JSSVGLazyEventListener.
  • ksvg2/events/JSSVGLazyEventListener.cpp: (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener): Pass the function name on to the base class constructor.
  • ksvg2/misc/SVGDocumentExtensions.h: Add function name parameter to createSVGEventListener.
  • ksvg2/misc/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::createSVGEventListener): Pass function name when calling createSVGEventHandler.
  • ksvg2/svg/SVGElement.cpp: (WebCore::SVGElement::addSVGEventListener):
  • ksvg2/svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::addSVGWindowEventListner): Pass attribute name as function name when calling createSVGEventListener.
  • WebCore.xcodeproj/project.pbxproj: Moved generation script to the top.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/object.h

    r13089 r13465  
    44 *  Copyright (C) 1999-2001 Harri Porten ([email protected])
    55 *  Copyright (C) 2001 Peter Kelly ([email protected])
    6  *  Copyright (C) 2003 Apple Computer, Inc.
     6 *  Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
    77 *
    88 *  This library is free software; you can redistribute it and/or
     
    370370     * Implementation of the [[Construct]] internal property
    371371     */
    372     virtual JSObject *construct(ExecState *exec, const List &args);
    373     virtual JSObject *construct(ExecState *exec, const List &args, const UString &sourceURL, int lineNumber);
     372    virtual JSObject* construct(ExecState* exec, const List& args);
     373    virtual JSObject* construct(ExecState* exec, const List& args, const Identifier& functionName, const UString& sourceURL, int lineNumber);
    374374
    375375    /**
Note: See TracChangeset for help on using the changeset viewer.