RefCountedArray needs to use vector initialisers for its backing store
https://bugs.webkit.org/show_bug.cgi?id=116194
Reviewed by Gavin Barraclough.
Source/JavaScriptCore:
Use an out of line function to clear the exception stack to avoid
needing to include otherwise unnecessary headers all over the place.
Everything else is just being updated to use that.
* bytecompiler/BytecodeGenerator.cpp:
* interpreter/CallFrame.h:
(JSC::ExecState::clearSupplementaryExceptionInfo):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::addStackTraceIfNecessary):
(JSC::Interpreter::throwException):
* runtime/JSGlobalObject.cpp:
(JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
* runtime/VM.cpp:
(JSC):
(JSC::VM::clearExceptionStack):
* runtime/VM.h:
(VM):
(JSC::VM::exceptionStack):
Source/WebCore:
Update to use new functions for operating on the exception stack.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):
Source/WTF:
Use VectorOperations to operate on the backing store
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::operator=):
(WTF::RefCountedArray::~RefCountedArray):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/interpreter/CallFrame.h b/Source/JavaScriptCore/interpreter/CallFrame.h
index 6f29f17..c09132c 100644
--- a/Source/JavaScriptCore/interpreter/CallFrame.h
+++ b/Source/JavaScriptCore/interpreter/CallFrame.h
@@ -70,7 +70,7 @@
void clearException() { vm().exception = JSValue(); }
void clearSupplementaryExceptionInfo()
{
- vm().exceptionStack = RefCountedArray<StackFrame>();
+ vm().clearExceptionStack();
}
JSValue exception() const { return vm().exception; }