Skip to content

Commit 1262d2e

Browse files
committed
[1.6>1.7] [MERGE #3583 @rajatd] Allow cross-site objects too in ActivationObjectEx::Is
Merge pull request #3583 from rajatd:actObj
2 parents a773e37 + bd2eba3 commit 1262d2e

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

lib/Runtime/Types/ActivationObject.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ namespace Js
210210

211211
static bool Is(void* instance)
212212
{
213-
return VirtualTableInfo<Js::ActivationObjectEx>::HasVirtualTable(instance);
213+
return VirtualTableInfo<ActivationObjectEx>::HasVirtualTable(instance) ||
214+
VirtualTableInfo<CrossSiteObject<ActivationObjectEx>>::HasVirtualTable(instance);
214215
}
215216

216217
static ActivationObjectEx * FromVar(Var instance)

test/Closures/bug_OS_13412380.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
var x = 'outside';
7+
var result;
8+
9+
(function() {
10+
var eval = WScript.LoadScript("", "samethread").eval;
11+
12+
eval('var x = "inside";');
13+
14+
result = x;
15+
}());
16+
print("passed");

test/Closures/rlexe.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,10 @@
181181
<baseline>copy-prop-stack-slot.baseline</baseline>
182182
</default>
183183
</test>
184+
<test>
185+
<default>
186+
<files>bug_OS_13412380.js</files>
187+
<tags>BugFix,exclude_dynapogo</tags>
188+
</default>
189+
</test>
184190
</regress-exe>

0 commit comments

Comments
 (0)