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

Side by Side Diff: test/inspector/debugger/caught-uncaught-exceptions.js

Issue 2488733003: [inspector] Add exception caught/uncaught status to protocol (Closed)
Patch Set: Use Maybe version of BooleanValue 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 print("Check that inspector correctly passes caught/uncaught information.");
6
7 InspectorTest.addScript(
8 `function throwCaught() { try { throw new Error(); } catch (_) {} }
9 function throwUncaught() { throw new Error(); }
10 function schedule(f) { setTimeout(f, 0); }
11 `);
12
13 Protocol.Debugger.enable();
14
15 Protocol.Debugger.setPauseOnExceptions({ "state": "all" });
16 Protocol.Debugger.onPaused(message => {
17 InspectorTest.log("paused in " + message.params.callFrames[0].functionName);
18 InspectorTest.log("uncaught: " + message.params.data.uncaught);
19 Protocol.Debugger.resume();
20 });
21
22 Protocol.Runtime.evaluate({ "expression": "schedule(throwCaught);" })
23 .then(() => Protocol.Runtime.evaluate(
24 { "expression": "schedule(throwUncaught);" }))
25 .then(() => InspectorTest.completeTest());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698