Changeset 34182 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp


Ignore:
Timestamp:
May 28, 2008, 1:47:13 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-05-27 Geoffrey Garen <[email protected]>

Reviewed by Tim Hatcher.

Fixed https://bugs.webkit.org/show_bug.cgi?id=19183
REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when
clicking button in returnEvent-crash.html

Added two new debugger hooks, willExecuteProgram and didExecuteProgram,
along with code to generate them, code to invoke them when unwinding
due to an exception, and code to dump them.


SunSpider reports no change.

  • VM/CodeBlock.cpp: (KJS::debugHookName): I had to mark this function NEVER_INLINE to avoid a .4% performance regression. The mind boggles.

WebCore:

2008-05-27 Geoffrey Garen <[email protected]>

Reviewed by Tim Hatcher.

Fixed https://bugs.webkit.org/show_bug.cgi?id=19183
REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when
clicking button in returnEvent-crash.html


Added implementations for willExecuteProgram and didExecuteProgram. They
take care to update our call frame when entering and exiting programs,
preventing us from keeping around a stale global frame after executing
a program.


eval programs now show up as "anonymous function" in a new scope. This
is slightly better than what they used to do -- overwriting the current
scope -- but obviously we can do better.

WebKit/mac:

2008-05-27 Geoffrey Garen <[email protected]>

Reviewed by Tim Hatcher.


Fixed https://bugs.webkit.org/show_bug.cgi?id=19183
REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when
clicking button in returnEvent-crash.html


Added implementations for willExecuteProgram and didExecuteProgram, which
take care of making sure we're not hanging on to stale data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r34177 r34182  
    58265826RegisterID* EvalNode::emitCode(CodeGenerator& generator, RegisterID*)
    58275827{
     5828    generator.emitDebugHook(WillExecuteProgram, firstLine(), lastLine());
     5829
    58285830    RefPtr<RegisterID> dstRegister = generator.newTemporary();
    58295831    generator.emitLoad(dstRegister.get(), jsUndefined());
    58305832    statementListEmitCode(m_children, generator, dstRegister.get());
     5833
     5834    generator.emitDebugHook(DidExecuteProgram, firstLine(), lastLine());
    58315835    generator.emitEnd(dstRegister.get());
    58325836    return 0;
     
    59025906RegisterID* ProgramNode::emitCode(CodeGenerator& generator, RegisterID*)
    59035907{
     5908    generator.emitDebugHook(WillExecuteProgram, firstLine(), lastLine());
     5909
    59045910    RefPtr<RegisterID> dstRegister = generator.newTemporary();
    59055911    generator.emitLoad(dstRegister.get(), jsUndefined());
    59065912    statementListEmitCode(m_children, generator, dstRegister.get());
     5913
     5914    generator.emitDebugHook(DidExecuteProgram, firstLine(), lastLine());
    59075915    generator.emitEnd(dstRegister.get());
    59085916    return 0;
Note: See TracChangeset for help on using the changeset viewer.