Changeset 150160 in webkit
- Timestamp:
- May 15, 2013, 5:29:25 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (modified) (1 diff)
-
JavaScriptCore/interpreter/CallFrame.h (modified) (1 diff)
-
JavaScriptCore/interpreter/Interpreter.cpp (modified) (2 diffs)
-
JavaScriptCore/runtime/JSGlobalObject.cpp (modified) (1 diff)
-
JavaScriptCore/runtime/VM.cpp (modified) (1 diff)
-
JavaScriptCore/runtime/VM.h (modified) (2 diffs)
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/RefCountedArray.h (modified) (3 diffs)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/bindings/js/ScriptCallStackFactory.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r150148 r150160 1 2013-05-15 Oliver Hunt <oliver@apple.com> 2 3 RefCountedArray needs to use vector initialisers for its backing store 4 https://bugs.webkit.org/show_bug.cgi?id=116194 5 6 Reviewed by Gavin Barraclough. 7 8 Use an out of line function to clear the exception stack to avoid 9 needing to include otherwise unnecessary headers all over the place. 10 11 Everything else is just being updated to use that. 12 13 * bytecompiler/BytecodeGenerator.cpp: 14 * interpreter/CallFrame.h: 15 (JSC::ExecState::clearSupplementaryExceptionInfo): 16 * interpreter/Interpreter.cpp: 17 (JSC::Interpreter::addStackTraceIfNecessary): 18 (JSC::Interpreter::throwException): 19 * runtime/JSGlobalObject.cpp: 20 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): 21 * runtime/VM.cpp: 22 (JSC): 23 (JSC::VM::clearExceptionStack): 24 * runtime/VM.h: 25 (VM): 26 (JSC::VM::exceptionStack): 27 1 28 2013-05-15 Commit Queue <commit-queue@webkit.org> 2 29 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r149496 r150160 41 41 #include "Options.h" 42 42 #include "StrongInlines.h" 43 #include "UnlinkedCodeBlock.h" 43 44 #include <wtf/text/WTFString.h> 44 45 -
trunk/Source/JavaScriptCore/interpreter/CallFrame.h
r148696 r150160 71 71 void clearSupplementaryExceptionInfo() 72 72 { 73 vm(). exceptionStack = RefCountedArray<StackFrame>();73 vm().clearExceptionStack(); 74 74 } 75 75 -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r149836 r150160 695 695 Vector<StackFrame> stackTrace; 696 696 getStackTrace(&callFrame->vm(), stackTrace); 697 vm->exceptionStack = RefCountedArray<StackFrame>(stackTrace);697 vm->exceptionStack() = RefCountedArray<StackFrame>(stackTrace); 698 698 if (stackTrace.isEmpty() || !error.isObject()) 699 699 return; … … 746 746 isTermination = isTerminatedExecutionException(exception); 747 747 } else { 748 if (!callFrame->vm().exceptionStack .size()) {748 if (!callFrame->vm().exceptionStack().size()) { 749 749 Vector<StackFrame> stack; 750 750 Interpreter::getStackTrace(&callFrame->vm(), stack); 751 callFrame->vm().exceptionStack = RefCountedArray<StackFrame>(stack);751 callFrame->vm().exceptionStack() = RefCountedArray<StackFrame>(stack); 752 752 } 753 753 } -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r149836 r150160 593 593 } 594 594 // Clear the exception stack between entries 595 vm. exceptionStack = RefCountedArray<StackFrame>();595 vm.clearExceptionStack(); 596 596 } 597 597 -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r149836 r150160 515 515 heap.collectAllGarbage(); 516 516 } 517 518 void VM::clearExceptionStack() 519 { 520 m_exceptionStack = RefCountedArray<StackFrame>(); 521 } 517 522 518 523 void releaseExecutableMemory(VM& vm) -
trunk/Source/JavaScriptCore/runtime/VM.h
r149836 r150160 327 327 328 328 JSValue exception; 329 RefCountedArray<StackFrame> exceptionStack; 329 JS_EXPORT_PRIVATE void clearExceptionStack(); 330 RefCountedArray<StackFrame>& exceptionStack() { return m_exceptionStack; } 330 331 331 332 const ClassInfo* const jsArrayClassInfo; … … 492 493 bool m_inDefineOwnProperty; 493 494 RefPtr<CodeCache> m_codeCache; 495 RefCountedArray<StackFrame> m_exceptionStack; 494 496 495 497 TypedArrayDescriptor m_int8ArrayDescriptor; -
trunk/Source/WTF/ChangeLog
r150134 r150160 1 2013-05-15 Oliver Hunt <oliver@apple.com> 2 3 RefCountedArray needs to use vector initialisers for its backing store 4 https://bugs.webkit.org/show_bug.cgi?id=116194 5 6 Reviewed by Gavin Barraclough. 7 8 Use VectorOperations to operate on the backing store 9 10 * wtf/RefCountedArray.h: 11 (WTF::RefCountedArray::RefCountedArray): 12 (WTF::RefCountedArray::operator=): 13 (WTF::RefCountedArray::~RefCountedArray): 14 1 15 2013-05-15 Nico Weber <thakis@chromium.org> 2 16 -
trunk/Source/WTF/wtf/RefCountedArray.h
r146964 r150160 84 84 Header::fromPayload(m_data)->length = other.size(); 85 85 ASSERT(Header::fromPayload(m_data)->length == other.size()); 86 memcpy(m_data, other.begin(), sizeof(T) * other.size());86 VectorTypeOperations<T>::uninitializedCopy(other.begin(), other.end(), m_data); 87 87 } 88 88 … … 98 98 if (--Header::fromPayload(oldData)->refCount) 99 99 return *this; 100 VectorTypeOperations<T>::destruct(oldData, oldData + Header::fromPayload(oldData)->length); 100 101 fastFree(Header::fromPayload(oldData)); 101 102 return *this; … … 108 109 if (--Header::fromPayload(m_data)->refCount) 109 110 return; 111 VectorTypeOperations<T>::destruct(begin(), end()); 110 112 fastFree(Header::fromPayload(m_data)); 111 113 } -
trunk/Source/WebCore/ChangeLog
r150159 r150160 1 2013-05-15 Oliver Hunt <oliver@apple.com> 2 3 RefCountedArray needs to use vector initialisers for its backing store 4 https://bugs.webkit.org/show_bug.cgi?id=116194 5 6 Reviewed by Gavin Barraclough. 7 8 Update to use new functions for operating on the exception stack. 9 10 * bindings/js/ScriptCallStackFactory.cpp: 11 (WebCore::createScriptCallStackFromException): 12 1 13 2013-05-15 Gavin Barraclough <barraclough@apple.com> 2 14 -
trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp
r149131 r150160 94 94 { 95 95 Vector<ScriptCallFrame> frames; 96 RefCountedArray<StackFrame> stackTrace = exec->vm().exceptionStack ;96 RefCountedArray<StackFrame> stackTrace = exec->vm().exceptionStack(); 97 97 for (size_t i = 0; i < stackTrace.size() && i < maxStackSize; i++) { 98 98 if (!stackTrace[i].callee && frames.size())
Note:
See TracChangeset
for help on using the changeset viewer.