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

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

Issue 1858773004: Revert of Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 Error.prepareStackTrace = function(exception, frames) {
6 return frames[0].getEvalOrigin();
7 }
8
9 var source = "new Error()";
10 var eval_origin;
11 var geval = eval;
12 var log = [];
13
14 (function() {
15 log.push([geval(source).stack, "15:13"]);
16 log.push([geval(source).stack, "16:13"]);
17 log.push([geval(source).stack, "17:13"]);
18 })();
19
20 (function() {
21 log.push([eval(source).stack, "21:13"]);
22 log.push([eval(source).stack, "22:13"]);
23 log.push([eval(source).stack, "23:13"]);
24 })();
25
26 log.push([eval(source).stack, "26:11"]);
27 log.push([eval(source).stack, "27:11"]);
28 log.push([eval(source).stack, "28:11"]);
29
30 Error.prepareStackTrace = undefined;
31
32 for (var item of log) {
33 var stacktraceline = item[0];
34 var expectation = item[1];
35 var re = new RegExp(`:${expectation}\\)$`);
36 assertTrue(re.test(stacktraceline));
37 }
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