Changeset 163223 in webkit for trunk/Source/JavaScriptCore/debugger
- Timestamp:
- Jan 31, 2014, 5:24:39 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore/debugger
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/debugger/Debugger.cpp
r162970 r163223 454 454 455 455 JSValue exception; 456 JSValue result = DebuggerCallFrame::evaluateWithCallFrame(m_currentCallFrame, breakpoints[i].condition, exception); 456 DebuggerCallFrame* debuggerCallFrame = currentDebuggerCallFrame(); 457 JSValue result = debuggerCallFrame->evaluate(breakpoints[i].condition, exception); 457 458 458 459 // We can lose the debugger while executing JavaScript. … … 622 623 pauseNow |= (m_pauseOnCallFrame == m_currentCallFrame); 623 624 625 DebuggerCallFrameScope debuggerCallFrameScope(*this); 626 624 627 intptr_t sourceID = DebuggerCallFrame::sourceIDForCallFrame(m_currentCallFrame); 625 628 TextPosition position = DebuggerCallFrame::positionForCallFrame(m_currentCallFrame); … … 628 631 if (!pauseNow) 629 632 return; 630 631 DebuggerCallFrameScope debuggerCallFrameScope(*this);632 633 633 634 // Make sure we are not going to pause again on breakpoint actions by -
trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
r163027 r163223 1 1 /* 2 * Copyright (C) 2008, 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2013, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 30 30 #include "DebuggerCallFrame.h" 31 31 32 #include " JSFunction.h"32 #include "CallFrameInlines.h" 33 33 #include "CodeBlock.h" 34 34 #include "Interpreter.h" 35 #include "JSActivation.h" 36 #include "JSFunction.h" 35 37 #include "Operations.h" 36 38 #include "Parser.h" … … 111 113 if (!isValid()) 112 114 return 0; 115 116 CodeBlock* codeBlock = m_callFrame->codeBlock(); 117 if (codeBlock && codeBlock->needsActivation() && !m_callFrame->hasActivation()) { 118 JSActivation* activation = JSActivation::create(*codeBlock->vm(), m_callFrame, codeBlock); 119 m_callFrame->setActivation(activation); 120 m_callFrame->setScope(activation); 121 } 122 113 123 return m_callFrame->scope(); 114 124 } … … 133 143 134 144 // Evaluate some JavaScript code in the scope of this frame. 135 JSValue DebuggerCallFrame::evaluate(const String& script, JSValue& exception) const 136 { 137 ASSERT(isValid()); 138 return evaluateWithCallFrame(m_callFrame, script, exception); 139 } 140 141 JSValue DebuggerCallFrame::evaluateWithCallFrame(CallFrame* callFrame, const String& script, JSValue& exception) 142 { 145 JSValue DebuggerCallFrame::evaluate(const String& script, JSValue& exception) 146 { 147 ASSERT(isValid()); 148 CallFrame* callFrame = m_callFrame; 143 149 if (!callFrame) 144 150 return jsNull(); … … 158 164 159 165 JSValue thisValue = thisValueForCallFrame(callFrame); 160 JSValue result = vm.interpreter->execute(eval, callFrame, thisValue, callFrame->scope());166 JSValue result = vm.interpreter->execute(eval, callFrame, thisValue, scope()); 161 167 if (vm.exception()) { 162 168 exception = vm.exception(); -
trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.h
r162970 r163223 1 1 /* 2 * Copyright (C) 2008, 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2013, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 63 63 JS_EXPORT_PRIVATE Type type() const; 64 64 JS_EXPORT_PRIVATE JSValue thisValue() const; 65 JS _EXPORT_PRIVATE JSValue evaluate(const String&, JSValue& exception) const;65 JSValue evaluate(const String&, JSValue& exception); 66 66 67 67 bool isValid() const { return !!m_callFrame; } … … 71 71 // made private soon. Other clients should not use these. 72 72 73 JS_EXPORT_PRIVATE static JSValue evaluateWithCallFrame(CallFrame*, const String& script, JSValue& exception);74 73 JS_EXPORT_PRIVATE static TextPosition positionForCallFrame(CallFrame*); 75 74 JS_EXPORT_PRIVATE static SourceID sourceIDForCallFrame(CallFrame*);
Note:
See TracChangeset
for help on using the changeset viewer.