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

Unified Diff: Source/core/inspector/JavaScriptCallFrame.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/core/inspector/JavaScriptCallFrame.h ('k') | Source/core/inspector/JavaScriptCallFrame.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/JavaScriptCallFrame.cpp
diff --git a/Source/core/inspector/JavaScriptCallFrame.cpp b/Source/core/inspector/JavaScriptCallFrame.cpp
index 813d0b800737a9e99b00366eb17910ecb1a255ea..4d0ecdfed8adc7836a8ad3983c5cfda6a280e4c5 100644
--- a/Source/core/inspector/JavaScriptCallFrame.cpp
+++ b/Source/core/inspector/JavaScriptCallFrame.cpp
@@ -74,6 +74,17 @@ int JavaScriptCallFrame::callV8FunctionReturnInt(const char* name) const
return 0;
}
+uint32_t JavaScriptCallFrame::callV8FunctionReturnUint32(const char* name) const
+{
+ v8::HandleScope handleScope(m_isolate);
+ v8::Handle<v8::Object> callFrame = m_callFrame.newLocal(m_isolate);
+ v8::Handle<v8::Function> func = v8::Handle<v8::Function>::Cast(callFrame->Get(v8AtomicString(m_isolate, name)));
+ v8::Handle<v8::Value> result = func->Call(callFrame, 0, 0);
+ if (result->IsUint32())
+ return result->Uint32Value();
+ return 0;
+}
+
String JavaScriptCallFrame::callV8FunctionReturnString(const char* name) const
{
v8::HandleScope handleScope(m_isolate);
@@ -98,6 +109,16 @@ int JavaScriptCallFrame::column() const
return callV8FunctionReturnInt("column");
}
+double JavaScriptCallFrame::framePointerHigh() const
+{
+ return callV8FunctionReturnUint32("framePointerHigh");
+}
+
+double JavaScriptCallFrame::framePointerLow() const
+{
+ return callV8FunctionReturnUint32("framePointerLow");
+}
+
String JavaScriptCallFrame::functionName() const
{
return callV8FunctionReturnString("functionName");
« no previous file with comments | « Source/core/inspector/JavaScriptCallFrame.h ('k') | Source/core/inspector/JavaScriptCallFrame.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698