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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/dart/inspector/merged-callstack.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 library merged_callstack_test;
2
3 import 'dart:core' as core; // import with prefix so global dart:core fields don 't appear in scope chain.
4 import 'dart:html' as html; // import with prefix so global dart:html fields don 't appear in scope chain.
5 import 'dart:js' as js; // import with prefix so global dart:js fields don't apppear in scope chain.
6
7 main() {
8 html.window.onMessage.listen(handleMessage);
9 }
10
11 handleMessage(event) {
12 if (event.data == 'fromJS') {
13 bounceDart(10);
14 }
15 }
16
17 bounceHelperDart(core.int count) {
18 js.context.callMethod("bounce", [count-1, bounceDart]);
19 }
20
21 bounceDart(core.int count) {
22 if (count > 0) {
23 core.Function.apply(bounceHelperDart, [count]);
24 } else {
25 html.window.postMessage('fromDart', '*');
26 }
27 }
OLDNEW
« 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