Ignore:
Timestamp:
Jan 26, 2009, 3:57:55 PM (16 years ago)
Author:
[email protected]
Message:

2009-01-26 Cameron Zwarich <[email protected]>

Reviewed by Gavin Barraclough.

Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
<https://bugs.webkit.org/show_bug.cgi?id=23552>
<rdar://problem/6398839>

Dashcode will crash when using the evaluator because it saves a global call
frame, even after global code has finished executing, and then uses this as
a launching pad to execute new JS in the evaluator. The fix is to detect
when Dashcode is attempting to do this and execute code from a global call
frame instead.

JavaScriptCore:

  • JavaScriptCore.exp:
  • debugger/Debugger.cpp: (JSC::evaluateInGlobalCallFrame): Added so that WebScriptCallFrame can evaluate JS starting from a global call frame.
  • debugger/Debugger.h:

WebKit/mac:

  • ForwardingHeaders/runtime/Protect.h: Added.
  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]): Added debugger, a WebScriptDebugger* argument. (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using a stale WebScriptCallFrame to execute new JS and evaluate it starting from the global object's global call frame instead.
  • WebView/WebScriptDebugger.h: (WebScriptDebugger::globalObject): Added. (WebScriptDebugger::globalCallFrame): Added.
  • WebView/WebScriptDebugger.mm: (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject. (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent so that the global call frame can be saved immediately after being created. (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of WebScriptCallFrame's _initWithGlobalObject method.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r40055 r40274  
    165165__ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_10JSValuePtrERKNS_7ArgListE
    166166__ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE
     167__ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_10JSValuePtrEPNS_14JSGlobalObjectE
    167168__ZN3JSC4Heap11objectCountEv
    168169__ZN3JSC4Heap14allocateNumberEm
Note: See TracChangeset for help on using the changeset viewer.