Changeset 172372 in webkit for trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
- Timestamp:
- Aug 8, 2014, 11:50:19 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
r172129 r172372 31 31 32 32 #include "CodeBlock.h" 33 #include "DebuggerScope.h"34 33 #include "Interpreter.h" 35 34 #include "JSActivation.h" … … 38 37 #include "Parser.h" 39 38 #include "StackVisitor.h" 40 #include "StrongInlines.h"41 39 42 40 namespace JSC { … … 109 107 } 110 108 111 DebuggerScope* DebuggerCallFrame::scope() 112 { 113 ASSERT(isValid()); 114 if (!isValid()) 115 return 0; 116 117 if (!m_scope) { 118 VM& vm = m_callFrame->vm(); 119 CodeBlock* codeBlock = m_callFrame->codeBlock(); 120 if (codeBlock && codeBlock->needsActivation() && !m_callFrame->hasActivation()) { 121 ASSERT(!m_callFrame->scope()->isWithScope()); 122 JSActivation* activation = JSActivation::create(vm, m_callFrame, codeBlock); 123 m_callFrame->setActivation(activation); 124 m_callFrame->setScope(activation); 125 } 126 127 m_scope.set(vm, DebuggerScope::create(vm, m_callFrame->scope())); 128 } 129 return m_scope.get(); 109 JSScope* DebuggerCallFrame::scope() const 110 { 111 ASSERT(isValid()); 112 if (!isValid()) 113 return 0; 114 115 CodeBlock* codeBlock = m_callFrame->codeBlock(); 116 if (codeBlock && codeBlock->needsActivation() && !m_callFrame->hasActivation()) { 117 JSActivation* activation = JSActivation::create(*codeBlock->vm(), m_callFrame, codeBlock); 118 m_callFrame->setActivation(activation); 119 m_callFrame->setScope(activation); 120 } 121 122 return m_callFrame->scope(); 130 123 } 131 124 … … 170 163 171 164 JSValue thisValue = thisValueForCallFrame(callFrame); 172 JSValue result = vm.interpreter->execute(eval, callFrame, thisValue, scope() ->jsScope());165 JSValue result = vm.interpreter->execute(eval, callFrame, thisValue, scope()); 173 166 if (vm.exception()) { 174 167 exception = vm.exception(); … … 182 175 { 183 176 m_callFrame = nullptr; 184 if (m_scope) {185 m_scope->invalidateChain();186 m_scope.clear();187 }188 177 RefPtr<DebuggerCallFrame> frame = m_caller.release(); 189 178 while (frame) {
Note:
See TracChangeset
for help on using the changeset viewer.