Skip to content

Commit aae4cd9

Browse files
committed
Add unit test
1 parent f93a85d commit aae4cd9

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

test/Basics/bug_os17542375.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//-------------------------------------------------------------------------------------------------------
2+
// Copyright (C) Microsoft. All rights reserved.
3+
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+
//-------------------------------------------------------------------------------------------------------
5+
6+
// With pageheap:2 we should not hit an AV
7+
8+
function foo() {
9+
var r = {};
10+
var b = {};
11+
var a = {};
12+
a.$ = r;
13+
14+
function foo1() {
15+
}
16+
function foo2() {
17+
}
18+
return r.noConflict = function(b) {
19+
return a.$ === r && (a.$ = Wb), b && a.jQuery === r && (a.jQuery = Vb), r
20+
}, b || (a.jQuery = a.$ = r), r
21+
}
22+
23+
foo();
24+
console.log('pass');

test/Basics/rlexe.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,4 +414,11 @@
414414
<tags>exclude_test,exclude_jshost,exclude_dynapogo</tags>
415415
</default>
416416
</test>
417+
<test>
418+
<default>
419+
<files>bug_os17542375.js</files>
420+
<compile-flags>-UseParserStateCache -ParserStateCache -Force:DeferParse -pageheap:2</compile-flags>
421+
<tags>exclude_test,exclude_jshost</tags>
422+
</default>
423+
</test>
417424
</regress-exe>

0 commit comments

Comments
 (0)