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

Unified Diff: test/mjsunit/es6/debug-exception-generators.js

Issue 2497973002: [debug-wrapper] Further extend the debug wrapper (Closed)
Patch Set: Address comments 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
Index: test/mjsunit/es6/debug-exception-generators.js
diff --git a/test/mjsunit/es6/debug-exception-generators.js b/test/mjsunit/es6/debug-exception-generators.js
deleted file mode 100644
index b2e7e82964f48ad9b141523fb456845635300f70..0000000000000000000000000000000000000000
--- a/test/mjsunit/es6/debug-exception-generators.js
+++ /dev/null
@@ -1,49 +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: --expose-debug-as debug
-
-Debug = debug.Debug
-
-var exception = null;
-var log = [];
-
-function listener(event, exec_state, event_data, data) {
- if (event != Debug.DebugEvent.Exception) return;
- try {
- var line = exec_state.frame(0).sourceLineText();
- var match = /Exception (\w)/.exec(line);
- assertNotNull(match);
- assertEquals(match[1], event_data.exception());
- log.push(match[1]);
- } catch (e) {
- exception = e;
- }
-}
-
-
-function* g() {
- try {
- throw "a"; // Ordinary throw. Exception a
- } catch (e) {}
- try {
- yield 1; // Caught internally. Exception b
- } catch (e) {}
- yield 2;
- yield 3; // Caught externally. Exception c
- yield 4;
-}
-
-Debug.setListener(listener);
-Debug.setBreakOnException();
-var g_obj = g();
-assertEquals(1, g_obj.next().value);
-assertEquals(2, g_obj.throw("b").value);
-assertEquals(3, g_obj.next().value);
-assertThrows(() => g_obj.throw("c"));
-assertThrows(() => g_obj.throw("d")); // Closed generator. Exception d
-Debug.setListener(null);
-Debug.clearBreakOnException();
-assertEquals(["a", "b", "c", "d"], log);
-assertNull(exception);
« no previous file with comments | « test/mjsunit/es6/debug-evaluate-receiver-before-super.js ('k') | test/mjsunit/es6/debug-promises/promise-all-uncaught.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698