mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1235874 - handle null filename in DescribeScriptedCaller (r=sunfish)
This commit is contained in:
parent
346ccd0aff
commit
7d8eec8034
1
js/src/jit-test/tests/basic/testBug1235874.js
Normal file
1
js/src/jit-test/tests/basic/testBug1235874.js
Normal file
@ -0,0 +1 @@
|
||||
evaluate('evalcx("1")', { fileName: null });
|
@ -5909,6 +5909,8 @@ JS_PUBLIC_API(bool)
|
||||
DescribeScriptedCaller(JSContext* cx, UniqueChars* filename, unsigned* lineno,
|
||||
unsigned* column)
|
||||
{
|
||||
if (filename)
|
||||
filename->reset();
|
||||
if (lineno)
|
||||
*lineno = 0;
|
||||
if (column)
|
||||
@ -5923,7 +5925,7 @@ DescribeScriptedCaller(JSContext* cx, UniqueChars* filename, unsigned* lineno,
|
||||
if (i.activation()->scriptedCallerIsHidden())
|
||||
return false;
|
||||
|
||||
if (filename) {
|
||||
if (filename && i.filename()) {
|
||||
UniqueChars copy = make_string_copy(i.filename());
|
||||
if (!copy)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user