Ignore:
Timestamp:
May 22, 2008, 9:32:33 PM (17 years ago)
Author:
Adam Roben
Message:

Fix a profiler assertion when calling a NodeList as a function

JavaScriptCore:

Fix a profiler assertion when calling a NodeList as a function

Reviewed by Kevin McCullough.

  • profiler/Profiler.cpp: (KJS::createCallIdentifier): Don't assert when a non-function object is called as a function. Instead, build up a CallIdentifier using the object's class name.

WebCore:

Add a test for calling a NodeList as a function while profiling

Reviewed by Kevin McCullough.

  • manual-tests/inspector/profiler-test-call-nodelist-as-function.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/profiler/Profiler.cpp

    r34036 r34047  
    161161        return CallIdentifier(static_cast<InternalFunctionImp*>(calledFunction)->functionName().ustring(), "", 0);
    162162
    163     ASSERT_NOT_REACHED();
    164     return CallIdentifier("", 0, 0);
     163    UString name = "(";
     164    name += calledFunction->classInfo()->className;
     165    name += " object)";
     166    return CallIdentifier(name, 0, 0);
    165167}
    166168
Note: See TracChangeset for help on using the changeset viewer.