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

Unified Diff: runtime/vm/debugger_api_impl_test.cc

Issue 23609032: Add "function" as an argument to Dart_ActivationFrameInfo (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« runtime/include/dart_debugger_api.h ('K') | « runtime/vm/debugger_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_api_impl_test.cc
diff --git a/runtime/vm/debugger_api_impl_test.cc b/runtime/vm/debugger_api_impl_test.cc
index 7fc6a6bb3865e0106ae4587da9af3f45a766cdef..58201ee45c4ce71f79ccb4a8f2fbf5265bedf97a 100644
--- a/runtime/vm/debugger_api_impl_test.cc
+++ b/runtime/vm/debugger_api_impl_test.cc
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "include/dart_debugger_api.h"
+#include "include/dart_mirrors_api.h"
#include "platform/assert.h"
#include "vm/dart_api_impl.h"
#include "vm/thread.h"
@@ -77,7 +78,7 @@ static char const* BreakpointInfo(Dart_StackTrace trace) {
intptr_t line_number = 0;
intptr_t library_id = 0;
res = Dart_ActivationFrameInfo(
- frame, &func_name, &url, &line_number, &library_id);
+ frame, &func_name, NULL, &url, &line_number, &library_id);
EXPECT_TRUE(res);
OS::SNPrint(info_str, sizeof(info_str), "function %s (%s:%" Pd ")",
ToCString(func_name), ToCString(url), line_number);
@@ -145,7 +146,7 @@ static void PrintValue(Dart_Handle value, bool expand) {
static void PrintActivationFrame(Dart_ActivationFrame frame) {
Dart_Handle func_name;
Dart_Handle res;
- res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL);
+ res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL, NULL);
EXPECT_TRUE(res);
EXPECT(Dart_IsString(func_name));
const char* func_name_chars;
@@ -236,7 +237,7 @@ static void VerifyStackFrame(Dart_ActivationFrame frame,
bool skip_null_expects) {
Dart_Handle func_name;
Dart_Handle res;
- res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL);
+ res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL, NULL);
EXPECT_TRUE(res);
EXPECT(Dart_IsString(func_name));
const char* func_name_chars;
@@ -292,7 +293,7 @@ void TestBreakpointHandler(Dart_IsolateId isolate_id,
res = Dart_GetActivationFrame(trace, i, &frame);
EXPECT_VALID(res);
Dart_Handle func_name;
- res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL);
+ res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL, NULL);
EXPECT_VALID(res);
EXPECT(Dart_IsString(func_name));
const char* name_chars;
@@ -340,14 +341,21 @@ void TestStepOutHandler(Dart_IsolateId isolate_id,
res = Dart_GetActivationFrame(trace, 0, &frame);
EXPECT_VALID(res);
Dart_Handle func_name;
- res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL);
+ Dart_Handle function;
+ res = Dart_ActivationFrameInfo(frame, &func_name, &function, NULL, NULL,
+ NULL);
EXPECT_VALID(res);
EXPECT(Dart_IsString(func_name));
+ EXPECT(Dart_IsFunction(function));
const char* name_chars;
+ const char* name_chars_from_function_handle;
Dart_StringToCString(func_name, &name_chars);
+ Dart_StringToCString(Dart_FunctionName(function),
+ &name_chars_from_function_handle);
if (breakpoint_hit_counter < expected_bpts_length) {
EXPECT_STREQ(expected_bpts[breakpoint_hit_counter], name_chars);
}
+ EXPECT_STREQ(name_chars, name_chars_from_function_handle);
if (verbose) {
OS::Print(" >> bpt nr %d: %s\n", breakpoint_hit_counter, name_chars);
}
@@ -418,7 +426,7 @@ void TestStepIntoHandler(Dart_IsolateId isolate_id,
res = Dart_GetActivationFrame(trace, 0, &frame);
EXPECT_VALID(res);
Dart_Handle func_name;
- res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL);
+ res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL, NULL);
EXPECT_VALID(res);
EXPECT(Dart_IsString(func_name));
const char* name_chars;
@@ -568,7 +576,7 @@ void TestSingleStepHandler(Dart_IsolateId isolate_id,
res = Dart_GetActivationFrame(trace, 0, &frame);
EXPECT_VALID(res);
Dart_Handle func_name;
- res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL);
+ res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL, NULL);
EXPECT_VALID(res);
EXPECT(Dart_IsString(func_name));
const char* name_chars;
@@ -628,7 +636,7 @@ static void ClosureBreakpointHandler(Dart_IsolateId isolate_id,
res = Dart_GetActivationFrame(trace, i, &frame);
EXPECT_VALID(res);
Dart_Handle func_name;
- res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL);
+ res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL, NULL);
EXPECT_VALID(res);
EXPECT(Dart_IsString(func_name));
const char* name_chars;
@@ -730,7 +738,7 @@ static void DeleteBreakpointHandler(Dart_IsolateId isolate_id,
res = Dart_GetActivationFrame(trace, i, &frame);
EXPECT_VALID(res);
Dart_Handle func_name;
- res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL);
+ res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL, NULL);
EXPECT_VALID(res);
EXPECT(Dart_IsString(func_name));
const char* name_chars;
« runtime/include/dart_debugger_api.h ('K') | « runtime/vm/debugger_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698