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

Unified Diff: LayoutTests/dart/inspector/merged-callstack.dart

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 | « no previous file | LayoutTests/dart/inspector/merged-callstack.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/dart/inspector/merged-callstack.dart
diff --git a/LayoutTests/dart/inspector/merged-callstack.dart b/LayoutTests/dart/inspector/merged-callstack.dart
new file mode 100644
index 0000000000000000000000000000000000000000..5376fc476457042c75d55876231b2acef935b813
--- /dev/null
+++ b/LayoutTests/dart/inspector/merged-callstack.dart
@@ -0,0 +1,27 @@
+library merged_callstack_test;
+
+import 'dart:core' as core; // import with prefix so global dart:core fields don't appear in scope chain.
+import 'dart:html' as html; // import with prefix so global dart:html fields don't appear in scope chain.
+import 'dart:js' as js; // import with prefix so global dart:js fields don't apppear in scope chain.
+
+main() {
+ html.window.onMessage.listen(handleMessage);
+}
+
+handleMessage(event) {
+ if (event.data == 'fromJS') {
+ bounceDart(10);
+ }
+}
+
+bounceHelperDart(core.int count) {
+ js.context.callMethod("bounce", [count-1, bounceDart]);
+}
+
+bounceDart(core.int count) {
+ if (count > 0) {
+ core.Function.apply(bounceHelperDart, [count]);
+ } else {
+ html.window.postMessage('fromDart', '*');
+ }
+}
« no previous file with comments | « no previous file | LayoutTests/dart/inspector/merged-callstack.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698