Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
[Merge chakra-core/ChakraCore@1262d2ea6d] [1.6>1.7] [MERGE #3583 @rajatd
Browse files Browse the repository at this point in the history
] Allow cross-site objects too in ActivationObjectEx::Is

Merge pull request #3583 from rajatd:actObj
  • Loading branch information
chakrabot authored and MSLaguana committed Sep 25, 2017
1 parent b43c5ee commit bc8df9e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deps/chakrashim/core/lib/Runtime/Types/ActivationObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ namespace Js

static bool Is(void* instance)
{
return VirtualTableInfo<Js::ActivationObjectEx>::HasVirtualTable(instance);
return VirtualTableInfo<ActivationObjectEx>::HasVirtualTable(instance) ||
VirtualTableInfo<CrossSiteObject<ActivationObjectEx>>::HasVirtualTable(instance);
}

static ActivationObjectEx * FromVar(Var instance)
Expand Down
16 changes: 16 additions & 0 deletions deps/chakrashim/core/test/Closures/bug_OS_13412380.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------

var x = 'outside';
var result;

(function() {
var eval = WScript.LoadScript("", "samethread").eval;

eval('var x = "inside";');

result = x;
}());
print("passed");
6 changes: 6 additions & 0 deletions deps/chakrashim/core/test/Closures/rlexe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,10 @@
<baseline>copy-prop-stack-slot.baseline</baseline>
</default>
</test>
<test>
<default>
<files>bug_OS_13412380.js</files>
<tags>BugFix,exclude_dynapogo</tags>
</default>
</test>
</regress-exe>

0 comments on commit bc8df9e

Please sign in to comment.