Fix preamble/d8.js currentScript for v8 6.9

Change-Id: I3783c51dc4f26ca21c368840758f7acf34f710b7
Reviewed-on: https://dart-review.googlesource.com/c/78865
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
Stephen Adams 2018-10-09 20:39:06 +00:00
parent 9cde31ba1d
commit daa13ad0aa

View file

@ -292,7 +292,13 @@ if (typeof global != "undefined") self = global; // Node.js.
// at init.currentScript (/tmp/foo.js:308:19)
// at /tmp/foo.js:320:7
// at /tmp/foo.js:331:4
var re = new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "mg");
// Sometimes the 'init.currentScript' line is in the format without the
// function name, so match with or without parentheses.
// vvvvvvvvvvvv Optional prefix up to '('.
var re = /^ *at (?:[^(]*\()?(.*):[0-9]*:[0-9]*\)?$/mg
// Optional ')' at end ^^^
var lastMatch = null;
do {
var match = re.exec(stack);