| Index: Source/bindings/common/StackTrace.cpp
|
| diff --git a/Source/bindings/common/Dictionary.cpp b/Source/bindings/common/StackTrace.cpp
|
| similarity index 71%
|
| copy from Source/bindings/common/Dictionary.cpp
|
| copy to Source/bindings/common/StackTrace.cpp
|
| index 71b66684fed084c0f6f0fac70301c4bf8a31168d..bcc52c6dc76ba836a0d6c0026da3dea45373995d 100644
|
| --- a/Source/bindings/common/Dictionary.cpp
|
| +++ b/Source/bindings/common/StackTrace.cpp
|
| @@ -29,36 +29,35 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "bindings/common/Dictionary.h"
|
| +#include "bindings/common/StackTrace.h"
|
|
|
| namespace WebCore {
|
|
|
| -void ConversionContext::resetPerPropertyContext()
|
| +StackTraces::StackTraces(StackTrace trace, ScriptState* scriptState)
|
| {
|
| - if (m_dirty) {
|
| - m_dirty = false;
|
| - m_isNullable = false;
|
| - m_propertyTypeName = "";
|
| - }
|
| + add(trace, scriptState);
|
| }
|
|
|
| -ConversionContext& ConversionContext::setConversionType(const String& typeName, bool isNullable)
|
| -{
|
| - ASSERT(!m_dirty);
|
| - m_dirty = true;
|
| - m_isNullable = isNullable;
|
| - m_propertyTypeName = typeName;
|
|
|
| - return *this;
|
| +StackTrace StackTraces::lookup(ScriptState* scriptState) const
|
| +{
|
| + StackTraceMap::const_iterator it = m_traces.find(scriptState);
|
| + if (it != m_traces.end())
|
| + return it->value;
|
| + ASSERT_NOT_REACHED();
|
| + return StackTrace();
|
| }
|
|
|
| -void ConversionContext::throwTypeError(const String& detail)
|
| +void StackTraces::add(const StackTrace& trace, ScriptState* scriptState)
|
| {
|
| - exceptionState().throwTypeError(detail);
|
| + m_traces.set(scriptState, trace);
|
| }
|
|
|
| -Dictionary::~Dictionary()
|
| +void StackTraces::add(const StackTraces& traces)
|
| {
|
| + for (const_iterator it = traces.begin(); it != traces.end(); ++it) {
|
| + m_traces.set(it->key, it->value);
|
| + }
|
| }
|
|
|
| } // namespace WebCore
|
|
|