This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge chakra-core/ChakraCore@12da6749b9] [1.6>1.7] [MERGE #3459 @sig…
…atrev] fix crashes with cross site typed virtual arrays Merge pull request #3459 from sigatrev:CrossSiteVirtualTypedArrays If an object has type CrossSiteObject\<T> then VirtualTableInfo\<T>::HasVirtualTable() will always return false. In the case of CrossSiteObject virtual typed arrays, the vtable check for the virtual array type was returning false, so they were assumed to be non-virtual arrays which is incorrect. Since no action was performed for the CrossSiteObject arrays anyway, this commit adds specific checks for the non-cross site, non-virtual array types, and removes the redundant CrossSite checks.
- Loading branch information
Showing
3 changed files
with
67 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//------------------------------------------------------------------------------------------------------- | ||
// Copyright (C) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
//------------------------------------------------------------------------------------------------------- | ||
|
||
function foo( type ) | ||
{ | ||
var g = WScript.LoadScript("a = new " + type + "(16777216);", "samethread"); | ||
g.a[0] = 0; | ||
g.a[0]; | ||
} | ||
|
||
foo("Int8Array"); | ||
foo("Uint8Array"); | ||
foo("Uint8ClampedArray"); | ||
foo("Int16Array"); | ||
foo("Uint16Array"); | ||
foo("Int32Array"); | ||
foo("Uint32Array"); | ||
foo("Float32Array"); | ||
foo("Float64Array"); | ||
|
||
WScript.Echo("PASSED"); |
Oops, something went wrong.