Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: Source/bindings/common/StackTrace.cpp

Issue 466243002: Support merged Dart-JS callstacks (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/common/StackTrace.h ('k') | Source/bindings/common/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/bindings/common/StackTrace.h ('k') | Source/bindings/common/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698