зеркало из https://github.com/mozilla/gecko-dev.git
Fix //@line from stdin and (more important) add @line testcase (618652, r=njn).
This commit is contained in:
Родитель
58e40ab54b
Коммит
238b2ff56e
|
@ -1587,7 +1587,7 @@ TokenStream::getTokenInternal()
|
|||
}
|
||||
}
|
||||
filenameBuf[i] = '\0';
|
||||
if (c == '\n') {
|
||||
if (c == EOF || c == '\n') {
|
||||
if (i > 0) {
|
||||
if (flags & TSF_OWNFILENAME)
|
||||
cx->free((void *) filename);
|
||||
|
|
|
@ -57,3 +57,4 @@ script regress-609617.js
|
|||
script regress-617405-1.js
|
||||
script regress-617405-2.js
|
||||
skip-if(!xulRuntime.shell) script regress-618576.js # uses evalcx
|
||||
fails-if(!xulRuntime.shell) script regress-618652.js
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
options('atline')
|
||||
|
||||
var F, L;
|
||||
|
||||
eval('//@line 42 "foo"\n' +
|
||||
'try { nosuchname; } catch (e) { F = e.fileName; L = e.lineNumber; }');
|
||||
assertEq(F, "foo");
|
||||
assertEq(L, 42);
|
||||
|
||||
reportCompare(0, 0, "ok");
|
Загрузка…
Ссылка в новой задаче