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

Unified Diff: test/debugger/debug/harmony/debug-async-function-async-task-event.js

Issue 2532693002: [debug-wrapper] AsyncTaskEvent event type (Closed)
Patch Set: Created 4 years, 1 month 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 | « test/debugger/debug/es6/debug-promises/throw-uncaught-uncaught.js ('k') | test/debugger/test-api.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/debugger/debug/harmony/debug-async-function-async-task-event.js
diff --git a/test/debugger/debug/harmony/debug-async-function-async-task-event.js b/test/debugger/debug/harmony/debug-async-function-async-task-event.js
deleted file mode 100644
index d5d506e153dab0a134397b48b23d7b95e5c089e1..0000000000000000000000000000000000000000
--- a/test/debugger/debug/harmony/debug-async-function-async-task-event.js
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --harmony-async-await
-
-// The test observes the callbacks that async/await makes to the inspector
-// to make accurate stack traces. The pattern is based on saving a stack once
-// with enqueueRecurring and restoring it multiple times.
-
-// Additionally, the limited number of events is an indirect indication that
-// we are not doing extra Promise processing that could be associated with memory
-// leaks (v8:5380). In particular, no stacks are saved and restored for extra
-// Promise handling on throwaway Promises.
-
-// TODO(littledan): Write a test that demonstrates that the memory leak in
-// the exception case is fixed.
-
-Debug = debug.Debug;
-
-var base_id = -1;
-var exception = null;
-var expected = [
- 'enqueueRecurring #1',
- 'willHandle #1',
- 'then #1',
- 'didHandle #1',
- 'willHandle #1',
- 'then #2',
- 'cancel #1',
- 'didHandle #1',
-];
-
-function assertLog(msg) {
- print(msg);
- assertTrue(expected.length > 0);
- assertEquals(expected.shift(), msg);
- if (!expected.length) {
- Debug.setListener(null);
- }
-}
-
-function listener(event, exec_state, event_data, data) {
- if (event != Debug.DebugEvent.AsyncTaskEvent) return;
- try {
- if ("Promise.resolve" == event_data.name()) return;
- if (base_id < 0)
- base_id = event_data.id();
- var id = event_data.id() - base_id + 1;
- assertTrue("async function" == event_data.name());
- assertLog(event_data.type() + " #" + id);
- } catch (e) {
- print(e + e.stack)
- exception = e;
- }
-}
-
-Debug.setListener(listener);
-
-var resolver;
-var p = new Promise(function(resolve, reject) {
- resolver = resolve;
-});
-
-async function main() {
- await p;
- assertLog("then #1");
- await undefined;
- assertLog("then #2");
-}
-main();
-resolver();
-
-%RunMicrotasks();
-
-assertNull(exception);
-
-Debug.clearBreakOnUncaughtException();
-Debug.setListener(null);
-
-var resolve;
-var turnOnListenerPromise = new Promise(r => resolve = r);
-async function confused() {
- await turnOnListenerPromise;
- throw foo
-}
-
-confused();
-
-Promise.resolve().then(() => {
- Debug.setListener(listener);
- Debug.setBreakOnUncaughtException();
- resolve();
-});
-
-%RunMicrotasks();
-assertNull(exception);
« no previous file with comments | « test/debugger/debug/es6/debug-promises/throw-uncaught-uncaught.js ('k') | test/debugger/test-api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698