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

Side by Side Diff: test/mjsunit/eval-origin.js

Issue 1854713002: Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/LookupSlot.golden ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Flags: --nostress-opt
6
7 Error.prepareStackTrace = function(exception, frames) {
8 return frames[0].getEvalOrigin();
9 }
10
11 var source = "new Error()";
12 var eval_origin;
13 var geval = eval;
14 var log = [];
15
16 (function() {
17 log.push([geval(source).stack, "17:13"]);
18 log.push([geval(source).stack, "18:13"]);
19 // log.push([geval(source).stack, "19:13"]); TODO(4921).
20 })();
21
22 (function() {
23 log.push([eval(source).stack, "23:13"]);
24 log.push([eval(source).stack, "24:13"]);
25 // log.push([eval(source).stack, "25:13"]); TODO(4921).
26 })();
27
28 log.push([eval(source).stack, "28:11"]);
29 log.push([eval(source).stack, "29:11"]);
30 // log.push([eval(source).stack, "30:11"]); TODO(4921).
31
32 Error.prepareStackTrace = undefined;
33
34 for (var item of log) {
35 var stacktraceline = item[0];
36 var expectation = item[1];
37 var re = new RegExp(`:${expectation}\\)$`);
38 assertTrue(re.test(stacktraceline));
39 }
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/LookupSlot.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698