issue_owner_repo
listlengths 2
2
| issue_body
stringlengths 0
261k
β | issue_title
stringlengths 1
925
| issue_comments_url
stringlengths 56
81
| issue_comments_count
int64 0
2.5k
| issue_created_at
stringlengths 20
20
| issue_updated_at
stringlengths 20
20
| issue_html_url
stringlengths 37
62
| issue_github_id
int64 387k
2.46B
| issue_number
int64 1
127k
|
---|---|---|---|---|---|---|---|---|---|
[
"chakra-core",
"ChakraCore"
] |
Hi everyone,
I found an inconsistence on Error() with more than one argument.
According to [ES6 Error constructor](https://tc39.github.io/ecma262/#sec-error-message) the Error is called with only one argument (message).
The other engines returns the first argument, chakra returns the second argument.
Steps to reproduce:
```
try{
throw new Error(null)
}catch (e){
print(e)
}
try{
throw new Error(null, 'test failed', 'another argument')
}catch (e){
print(e)
}
```
Actual results:
Error: null
Error: test failed
Expected results:
Error: null
Error: null
V8, SpiderMonkey and JSC works as expected.
OS: Ubuntu 16.04 x86
chakra: 1.11.0.0-beta
|
Error constructor with more than one argument
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5443/comments
| 4 |
2018-07-10T15:40:43Z
|
2021-03-13T03:18:14Z
|
https://github.com/chakra-core/ChakraCore/issues/5443
| 339,899,457 | 5,443 |
[
"chakra-core",
"ChakraCore"
] |
OS: Ubuntu 16.04 x86
chakra: 1.11.0.0-beta
Hi everyone,
I found an inconsistence on Date() with a negative value.
I was looking on ES6 specification about this issue but I didn't found an answer, maybe the correct way is convert the -0 to +0
as V8 and SpiderMonkey do.
Steps to reproduce:
```
d = new Date(-0);
print(Object.is(d.getTime(), +0))
```
Actual results:
false
Expected results:
true
V8 and SpiderMonkey works as expected.
|
Date constructor with negative value argument
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5442/comments
| 7 |
2018-07-10T15:36:04Z
|
2022-10-03T19:09:44Z
|
https://github.com/chakra-core/ChakraCore/issues/5442
| 339,897,548 | 5,442 |
[
"chakra-core",
"ChakraCore"
] |
BigInt support is currently at Stage 3: https://github.com/tc39/proposal-bigint
Node is starting to take a dependency on it: https://github.com/nodejs/node/pulls?q=is:pr+bigint
There's currently an N-API change in PR: https://github.com/nodejs/node/pull/21226
|
Implement BigInt
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5440/comments
| 1 |
2018-07-10T00:39:53Z
|
2019-06-25T09:24:54Z
|
https://github.com/chakra-core/ChakraCore/issues/5440
| 339,653,601 | 5,440 |
[
"chakra-core",
"ChakraCore"
] |
I am currently developing an Angular application fetching data from an GraphQL server. When the GraphQL server throws an error and does not return data, the console in Edge would show a simple "Error on "fetch"" message whereas a browser like Firefox would show the correct error returned from the GraphQL server. As both browsers access the same Angular project connecting to the same GraphQL server through the same graphql-request module the problem seems to lie in Edge and presumably in Chakra.
The attached images show the returned error (1) from the GraphQL playground, (2) Firefox and (3) Edge.



|
Fetch errors not displayed correctly
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5434/comments
| 4 |
2018-07-08T21:02:19Z
|
2018-11-30T00:30:13Z
|
https://github.com/chakra-core/ChakraCore/issues/5434
| 339,257,493 | 5,434 |
[
"chakra-core",
"ChakraCore"
] |
I recently wrote a prime number generator which I noticed ran significantly slower on Chakra than on other engines:
```js
"use strict";
const numberOfPrimes = 1000000;
const primes = new Uint32Array(10000001);
const products = new Uint32Array(10000001);
primes[0] = 2;
primes[1] = 3;
primes[2] = 5;
primes[3] = 7;
products[0] = 4;
products[1] = 9;
products[2] = 25;
products[3] = 49;
let possible = 7;
let length = 4;
function nextPrime()
{
let looking = true;
while (looking)
{
possible += 2;
looking = !checkNumber();
}
primes[length] = possible;
products[length] = possible * possible;
++length;
}
function checkNumber()
{
let result = true;
for (let i = 1; products[i] <= possible; ++i)
{
if ((possible % primes[i]) === 0)
{
result = false;
break;
}
}
return result;
}
const start = Date.now();
while (length < numberOfPrimes)
{
nextPrime();
}
const end = Date.now();
print(`Generated ${numberOfPrimes - 4} primes and took = ${end - start} milliseconds`);
print(`The last prime was ${primes[numberOfPrimes - 1]}`);
```
Testing on my MacBook pro in Jsc that takes around 2 seconds to run, in v8 around 2.1 seconds and in ch around 3.8 seconds.
Replacing the use of the modulus operation '%' with the following function equalised jsc and ch at 2.1 seconds:
```js
function fastMod(numerator, denominator)
{
return numerator - (numerator / denominator|0) * denominator;
}
```
Examining JavaScriptCore's source as compared with ChakraCore's source the relevant difference is that JavaScriptCore has a method to generate a fast inline modulus operator whereas ChakraCore always uses a helper call.
Not sure how significant this would be in most real world code - the modulus operator probably isn't on lots of hot paths but considering that jsc, v8 and SM already optimise this the lack of optimisation in CC may come as a surprise to developers.
|
Performance: Modulus operator is slow
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5432/comments
| 0 |
2018-07-07T10:18:49Z
|
2018-07-12T07:38:53Z
|
https://github.com/chakra-core/ChakraCore/issues/5432
| 339,134,976 | 5,432 |
[
"chakra-core",
"ChakraCore"
] |
Hi,
I just found that error occurs when compiling latest version ChakraCore with code page 936 (which is default code page on Windows Chinese-Simplified version).
VS print this.
```
Severity Code Description Project File Line Suppression State
Warning C4819 The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss Chakra.Runtime.Library e:\chakracore\lib\runtime\library\JsBuiltIn\JsBuiltIn.js.bc.64b.h 1
```
It seems that `JsBuiltIn.js.bc.64b.h` is encoded in UTF-8 (code page 650001). I have to `save-as` it with encoding GB2312(code page 936) every time before compiling the latest commit.
|
Compile failed with code page 936.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5428/comments
| 1 |
2018-07-06T04:47:02Z
|
2018-07-16T18:56:07Z
|
https://github.com/chakra-core/ChakraCore/issues/5428
| 338,803,789 | 5,428 |
[
"chakra-core",
"ChakraCore"
] |
It seems to me that, under Linux/macOS, dynamically built `ch` binary will only looks for the dynamic library (`libChakraCore.so`/`libChakraCore.dylib`) under the same directory as the binary itself.
However, Linux/macOS usually put binaries and libraries under different directories (`bin` and `lib`).
If that's the case, when packaging ChakraCore for Linux and macOS, we have to build two times in order to get the dynamic library and a usable (statically built) `ch` binary.
I provide patches to build scripts for ArchLinux and Homebrew (macOS):
1. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chakracore (line 21-22)
2. https://github.com/MikeChou/homebrew-core/blob/5823ffee6bafe925a8bc2ab53f500ae6489542f4/Formula/chakra.rb#L29-L30
If `ch` can look for the dynamic library according to the environment vairable `LD_LIBRARY_PATH` or some other standard mechanism, there will be no need to build the binary a second time for this purpose alone, hence will save time and disk space.
|
Confirm how dynamically built `ch` binary looks for the library
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5425/comments
| 5 |
2018-07-04T18:02:36Z
|
2021-01-30T17:21:48Z
|
https://github.com/chakra-core/ChakraCore/issues/5425
| 338,349,304 | 5,425 |
[
"chakra-core",
"ChakraCore"
] |
Issue I noticed whilst working on #5405 async/generator functions report that their length properties are configurable but attempting to delete them or redefine with Object.defineProperty silently fails.
I intend to submit a PR to fix this after #5405 is merged - issue created as a reminder/in case #5405 can't be merged.
Example:
```js
function* gen(a, b) { }
async function asy(a, b, c) { }
print ("generator function.length property exists: " + gen.hasOwnProperty("length"));
print ("async function.length property exists: " + asy.hasOwnProperty("length"));
print("async function.length configurable = " + Object.getOwnPropertyDescriptor(asy, "length").configurable);
print("generator function.length configurable = " + Object.getOwnPropertyDescriptor(gen, "length").configurable);
print ("async function property names: " + Object.getOwnPropertyNames(asy));
print ("generator function property names: " + Object.getOwnPropertyNames(gen));
delete gen.length
if (gen.length !== 0) {
print("Deleting generator function length failed");
}
delete asy.length;
if (asy.length !== 0) {
print("Deleting async function length failed");
}
```
Eshost output:
```
#### V8
generator function.length property exists: true
async function.length property exists: true
async function.length configurable = true
generator function.length configurable = true
async function property names: length,name
generator function property names: length,name,prototype
#### Chakra
generator function.length property exists: true
async function.length property exists: true
async function.length configurable = true
generator function.length configurable = true
async function property names: name
generator function property names: prototype,name
Deleting generator function length failed
Deleting async function length failed
```
Starting point - Delete property handler for Generator function BUT note the type handler for a generator function is not given a length property so just changing this point wouldn't be enough:
https://github.com/Microsoft/ChakraCore/blob/94434008819dfed6e8ede678526875a67cfaa614/lib/Runtime/Library/JavascriptGeneratorFunction.cpp#L483-L489
EDIT: note these lengths also don't get returned by Object.getOwnPropertyNames
|
Async/Generator function lengths can't be configured
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5419/comments
| 2 |
2018-07-03T23:07:26Z
|
2018-08-27T20:48:31Z
|
https://github.com/chakra-core/ChakraCore/issues/5419
| 338,081,266 | 5,419 |
[
"chakra-core",
"ChakraCore"
] |
ChakraCore will output target backend assembly representation using "-dump:backend" option, but these dumped instruction are represented as kind of ChakraCore's code form.
for example, these look like.
s394(r7)[LikelyCanBeTaggedValue_Int].var = MOV s102(r6)[LikelyCanBeTaggedValue_Int].var
s395(r11).i64 = MOV s394(r7)[LikelyCanBeTaggedValue_Int].var
s395(r11).i64 = UBFX s395(r11).i64, 1048624 (0x100030).i64
Can I dump the JITed code as the pure native assembly? like mov r7, r6
|
View of the generated assembly code
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5393/comments
| 6 |
2018-06-29T00:18:33Z
|
2018-10-09T23:22:59Z
|
https://github.com/chakra-core/ChakraCore/issues/5393
| 336,822,045 | 5,393 |
[
"chakra-core",
"ChakraCore"
] |
Hi everyone,
there is an inconsistence on Chakra when I call this Proxy using Symbol.search.
The `-ES6Experimental` flag is activated.
Chakra: ch version 1.11.0.0-beta
OS: Ubuntu 16.04 x64
Steps to reproduce:
```
function test() {
var get = [];
var p = new Proxy(
{ exec: function () { return null; } },
{ get: function (o,k) { get.push(k); return o[k]; }}
);
RegExp.prototype[Symbol.search].call(p);
return get + "" ===
"lastIndex,exec,lastIndex";
}
if (!test())
throw new Error("Test failed");
```
Actual results:
Error: Test failed
Expected results:
Pass without failures
It was observed that the array `get` contains only `"lastIndex,exec"`. The others engines (V8, SpiderMonkey and JavascriptCore) works as expected (lastIndex,exec,lastIndex).
cinfuzz
|
RegExp should call property "lastIndex" using Symbol.search
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5388/comments
| 3 |
2018-06-28T19:47:29Z
|
2020-03-25T08:54:24Z
|
https://github.com/chakra-core/ChakraCore/issues/5388
| 336,755,756 | 5,388 |
[
"chakra-core",
"ChakraCore"
] |
```js
(function() {
print('Array fill with increment of 2')
var start = new Date();
let maxSize = 2**25;
let arr = new Array(maxSize);
for (i = 0; i < maxSize; i += 2) {
arr[i] = i;
}
print('time spent : ' + ((new Date()) - start));
})();
(function() {
print('Array fill with increment of 512')
var start = new Date();
let maxSize = 2**25;
let arr = new Array(maxSize);
for (i = 0; i < maxSize; i += 512) {
arr[i] = i;
}
print('time spent : ' + ((new Date()) - start));
})();
```
Output:
```
Array fill with increment of 2
time spent : 369
Array fill with increment of 512
time spent : 4196
```
This is strange - with 512 increment we should be filling less items to the array and we should be spending less time.
I suspect this may be due to more number of sparse array segment. I haven't created trace to support my theory.
|
Perf : filling the array is taking time
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5386/comments
| 5 |
2018-06-28T18:35:39Z
|
2018-06-29T18:26:14Z
|
https://github.com/chakra-core/ChakraCore/issues/5386
| 336,733,403 | 5,386 |
[
"chakra-core",
"ChakraCore"
] |
If the object has 128 keys that include dashes, then the non-enumerable property will be enumerable (also writable, configurable).
Tested on Edge 42.17134.1.0
```javascript
const test = (length = 128) => {
let data = {};
for (let i = 0; i < length; i++) {
data[i + '-'] = true;
}
Object.defineProperty(data, 'nonEnumerable', {enumerable: false});
return Object.getOwnPropertyDescriptor(data, 'nonEnumerable');
};
```
https://jsfiddle.net/q690m7w8/
|
Non-enumerable property is enumerable under certain conditions
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5382/comments
| 6 |
2018-06-28T17:34:20Z
|
2018-06-28T18:17:33Z
|
https://github.com/chakra-core/ChakraCore/issues/5382
| 336,713,849 | 5,382 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
The following code behaves strangely (inconsistent with other engines).
```
a=[3.3,2.2,1];
a.sort(function () { return -1;});
```
In Edge, output is
```[1, 2.2, 3.3]```
However, output should be:
```[3.3, 2.2, 1]```
BT group
2018.6.28
|
Inconsistent output compared with other JS engines when using sort()
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5381/comments
| 6 |
2018-06-28T03:43:10Z
|
2018-06-28T17:14:34Z
|
https://github.com/chakra-core/ChakraCore/issues/5381
| 336,462,287 | 5,381 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
The following code behaves strangely (inconsistent with other engines).
```
try {
f0();
function g(f0){
f0();
};
}catch(g){}
g(()=>{print("hi");});
```
In Edge, output is
```hi```
However, in V8 and Firefox, output is
```TypeError: g is not a function```
BT group
2018.6.27
|
Inconsistent output compared with other JS engines when declare a function in try...catch
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5379/comments
| 1 |
2018-06-27T13:32:55Z
|
2018-06-27T23:06:24Z
|
https://github.com/chakra-core/ChakraCore/issues/5379
| 336,232,105 | 5,379 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
The following code behaves strangely (inconsistent with other engines).
```
v1 = new (Float64Array)();
v2 = {
valueOf : function () {
v3.y = "bar";
return 42; }
};
v3 = v1;
v3[0] = v2;
print(JSON.stringify(v1));
```
In Edge, output is
```{"y":"bar"}```
However, in V8 and Firefox, output is
```{}```
BT group
2018.6.27
|
Inconsistent output compared with other JS engines
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5378/comments
| 1 |
2018-06-27T12:41:23Z
|
2018-06-27T15:46:04Z
|
https://github.com/chakra-core/ChakraCore/issues/5378
| 336,212,487 | 5,378 |
[
"chakra-core",
"ChakraCore"
] |
Follow-up from https://github.com/Microsoft/ChakraCore/pull/5307
|
Add Jenkins configuration for RS4 with Intl-ICU
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5373/comments
| 0 |
2018-06-26T22:45:58Z
|
2020-03-31T15:15:33Z
|
https://github.com/chakra-core/ChakraCore/issues/5373
| 336,017,885 | 5,373 |
[
"chakra-core",
"ChakraCore"
] |
For reference, see
- Throw in async function after await is not caught by debugger #4630
- Debugger: Add support for breaking in debugger on unhandled promise rejection #5370
- fixing issue where "uncaught" exceptions in promises wouldn't notify debugger #5328
Currently, when we resolve a promise with a thenable, we defer the call the to the thenable's then() method by putting a task in the queue. This is by-design wrt the spec. However, this results in some undesired behavior wrt breaking on uhandled promise rejections.
Specifically, this code:
```javascript
function f1() {
let promiseA = new Promise((resolveA, rejectA) => {
let promiseB = Promise.resolve(true).then(() => {
throw new Error('error for handledPromiseRejection9_bugbug');
});
resolveA(promiseB);
});
return promiseA;
}
f1().catch((e) => {
});
```
will trigger a 2nd-chance exception break on the throw because we don't yet know about the pending hookup of handlers in the `.catch` block, as that's pending in the queue.
The fix here is to add some logic to keep track of the pending hookup on the thenable, and then inspect that the reactions of that thenable when the throw happens.
|
Debugger: Support detecting pending promise reactions for "break on uhandled exceptions"
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5371/comments
| 0 |
2018-06-26T19:20:34Z
|
2018-06-26T23:19:59Z
|
https://github.com/chakra-core/ChakraCore/issues/5371
| 335,957,391 | 5,371 |
[
"chakra-core",
"ChakraCore"
] |
When we have a promise rejection and we don't have any reject handlers hooked up, we should break in the debugger if 2nd-chance exceptions are enabled. Alternatively, we should provide a 2nd option which is to "break on unhandled rejections".
May potentially need to do some coordination w/ dev tools team to ensure this lights up correctly.
|
Debugger: Add support for breaking in debugger on unhandled promise rejection
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5370/comments
| 0 |
2018-06-26T19:15:06Z
|
2018-06-26T23:19:54Z
|
https://github.com/chakra-core/ChakraCore/issues/5370
| 335,955,722 | 5,370 |
[
"chakra-core",
"ChakraCore"
] |
While working on Atomics tests for Test262, I observed that any test which checked that the return value of `Atomics.wake(...)` was some non-zero value, the test would fail. I've tracked the cause:
https://github.com/Microsoft/ChakraCore/blob/c0723f4985c468937c6ac12260bdbe5da6d25539/lib/Runtime/Library/SharedArrayBuffer.cpp#L764-L780
|
Atomics.wake(...) always returns 0 on non-win32 platforms
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5368/comments
| 1 |
2018-06-26T17:34:00Z
|
2018-06-28T05:42:51Z
|
https://github.com/chakra-core/ChakraCore/issues/5368
| 335,922,575 | 5,368 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
The following code behaves strangely (inconsistent with other engines).
```
class cc extends ( x = function () {
console.log("Hi");
}) {
};
```
In Edge, cc is defined normally and x is defined too.
However, in V8 and Firefox, a ReferenceError is reported:
`ReferenceError: assignment to undeclared variable x`
BT group
2018.6.26
|
No error for assignment to undefined inside extends expression
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5367/comments
| 1 |
2018-06-26T15:04:42Z
|
2020-03-25T16:56:43Z
|
https://github.com/chakra-core/ChakraCore/issues/5367
| 335,864,202 | 5,367 |
[
"chakra-core",
"ChakraCore"
] |
See https://github.com/Microsoft/ChakraCore/wiki/Build-Status-%28release-1.8%29
```
13:55:03 [1m/Users/dotnet-bot/j/w/Microsoft_ChakraCore/release_1.8/static_osx_osx_debug/lib/Runtime/PlatformAgnostic/Platform/Linux/UnicodeText.ICU.cpp:38:22: [0m[0;1;31merror: [0m[1munknown type name 'Normalizer2'; did you mean 'UNormalizer2'?[0m
13:55:03 static const Normalizer2* TranslateToICUNormalizer(NormalizationForm normalizationForm)
13:55:03 [0;1;32m ^~~~~~~~~~~
13:55:03 [0m[0;32m UNormalizer2
13:55:03 [0m[1m/usr/local/opt/icu4c/include/unicode/unorm2.h:120:29: [0m[0;1;30mnote: [0m'UNormalizer2' declared here[0m
13:55:03 typedef struct UNormalizer2 UNormalizer2; /**< C typedef for struct UNormalizer2. @stable ICU 4.4 */
```
|
OS X builds failing in release/1.8
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5365/comments
| 3 |
2018-06-26T01:05:21Z
|
2018-06-26T17:36:32Z
|
https://github.com/chakra-core/ChakraCore/issues/5365
| 335,620,649 | 5,365 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
The following code behaves incorrectly (inconsistent with the standard and other engines).
ch version 1.8.5.0
```
var nonArray=({
length:4,
0:42,
2:37,
0xf7da5000:undefined,
0x8000000000000800:0
});
Array.prototype.sort.call(nonArray);
print(JSON.stringify(nonArray));
print("BT_FLAG");
```
The output is:
{"0":37,"1":42,"length":4,"9223372036854777000":0}
BT_FLAG
However, other engines' output are:
{"0":37,"1":42,"length":4,"9223372036854778000":0}
BT_FLAG
BT group
2018.6.25
|
string representation of floats larger than 2^53 differs from other engines
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5363/comments
| 2 |
2018-06-25T08:48:01Z
|
2018-06-26T01:13:29Z
|
https://github.com/chakra-core/ChakraCore/issues/5363
| 335,313,695 | 5,363 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
The following code behaves incorrectly (inconsistent with the standard and other engines).
ch version 1.8.5.0
```
function testToUint32InSplit(){
var re;
function toDictMode(){
(({foo:'final'}));
(delete (re.x));
return "def";
}(re=/./g);
return re[Symbol.replace]("abc",({valueOf:toDictMode}));
}
function testToStringInReplace(){
var re;
function toDictMode(){
(re.x=42);
(delete (re.x));
return 42;
}(re=/./g);
return re[Symbol.split]("abc",({valueOf:toDictMode}));
}(testToUint32InSplit());
print("BT_FLAG");
```
The output is:
TypeError: Object doesn't support property or method 'undefined'
at testToUint32InSplit (/home/xxx/temp/xxx.js:8:5)
at Global code (/home/xxx/temp/xxx.js:19:3)
However, it should be:
BT_FLAG
BT group
2018.6.25
|
Inconsistent output compared with other JS engines
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5362/comments
| 1 |
2018-06-25T08:18:18Z
|
2018-06-26T01:17:47Z
|
https://github.com/chakra-core/ChakraCore/issues/5362
| 335,304,014 | 5,362 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
The following code behaves incorrectly (inconsistent with the standard and other engines).
ch version 1.8.5.0
```
(("").match(/(A{9999999999}B|C*)*D/));
print("BT_FLAG");
```
Output is:
SyntaxError: Syntax error in regular expression
at code (55577775.js:1:26)
However, other engines output:
BT_FLAG
BT group
2018.6.25
|
Inconsistent output compared with other JS engines: syntax error on large integer literal in regexp
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5361/comments
| 2 |
2018-06-25T07:38:13Z
|
2018-06-26T01:17:22Z
|
https://github.com/chakra-core/ChakraCore/issues/5361
| 335,292,303 | 5,361 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
The following code behaves incorrectly (inconsistent with the standard and other engines).
ch version 1.8.5.0
```
arr0 = [ 1, 2, 3 ];
arr1 = [ 4, 5, 6 ];
handler1 = {
get: function (oTarget, sKey) {
print('arg ' + '1' + ':get ' + sKey.toString());
if (sKey.toString() == 'Symbol(Symbol.isConcatSpreadable)') {
arr1['length'] = 4294967294;
}
if (sKey.toString() == 'length') {
arr1['length'] = 10;
}
if (Number(sKey.toString()) != NaN) { ; }
return Reflect.get(oTarget, sKey);
},
has: function (oTarget, sKey) {
print('arg ' + '1' + ':has ' + sKey.toString());
if (Number(sKey.toString()) != NaN) {
return Symbol.search;
}
return Reflect.has(oTarget, sKey);
}
};
var proxy1 = new Proxy(arr1, handler1);
func = Array.prototype.concat.bind(arr0, proxy1);
arr2 = func();
print(arr2);
```
The output is:
arg 1:get Symbol(Symbol.isConcatSpreadable)
arg 1:get length
arg 1:has 0
arg 1:has 1
arg 1:has 2
arg 1:has 3
arg 1:has 4
arg 1:has 5
arg 1:has 6
arg 1:has 7
arg 1:has 8
arg 1:has 9
1,2,3,,,,,,,,,,
However, it should be:
arg 1:get Symbol(Symbol.isConcatSpreadable)
arg 1:get length
arg 1:has 0
arg 1:get 0
arg 1:has 1
arg 1:get 1
arg 1:has 2
arg 1:get 2
arg 1:has 3
arg 1:get 3
arg 1:has 4
arg 1:get 4
arg 1:has 5
arg 1:get 5
arg 1:has 6
arg 1:get 6
arg 1:has 7
arg 1:get 7
arg 1:has 8
arg 1:get 8
arg 1:has 9
arg 1:get 9
1,2,3,4,5,6,,,,,,,
BT group
2018.6.25
|
Inconsistent output compared with V8 and SpiderMonkey
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5360/comments
| 1 |
2018-06-25T06:49:06Z
|
2018-06-26T01:18:03Z
|
https://github.com/chakra-core/ChakraCore/issues/5360
| 335,279,304 | 5,360 |
[
"chakra-core",
"ChakraCore"
] |
Not sure if this is an Edge or F12 issue, but in any case I'm having a hard time porting a web app that uses web crypto to Edge. Below please find a similar simpler use case that also does not resolve.
Sample code:
borrowed: from here: https://github.com/diafygi/webcrypto-examples#aes-ctr---generatekey
```javascript
crypto.subtle.generateKey(
{
name: "AES-CTR",
length: 256, //can be 128, 192, or 256
},
false, //whether the key is extractable (i.e. can be used in exportKey)
["encrypt", "decrypt"] //can "encrypt", "decrypt", "wrapKey", or "unwrapKey"
)
.then(function(key){
//returns a key object
console.log(key);
})
```
Chrome behavior:
prints out the CryptoKey

Edge Behavior

Testing is on Edge version 17 off of browserstack.
https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey
support for this API seems to be available as of Edge 12.
At this point not sure if the debugger is lying to me or if the API is deficient.
|
webcrypto generateKey promise does not resolve.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5359/comments
| 1 |
2018-06-23T04:42:37Z
|
2018-06-23T07:49:48Z
|
https://github.com/chakra-core/ChakraCore/issues/5359
| 335,068,151 | 5,359 |
[
"chakra-core",
"ChakraCore"
] |
Hey, I wrote a sample [app ](https://github.com/SiamAbdullah/sampleChakraCoreApp) where I serialized JavaScript into byte array and executed serialized script in different runtime. The app is getting crashed after a period of time. It is throwing AccessViolationException.
**Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt**.
at ChakraHost.Hosting.Native.JsRunScript(String script, JavaScriptSourceContext sourceContext, String sourceUrl, JavaScriptValue& result)
at ChakraHost.Hosting.JavaScriptContext.RunScript(String script, JavaScriptSourceContext sourceContext, String sourceName) in E:\ChakraCoreSampleApp\ChakraCoreHost\Hosting\JavaScriptContext.cs:line 221
at ChakraCoreHost.ChakraCoreSimulation.<>c__DisplayClass3_0.<ExecutedSerializedScript>b__0() in E:\ChakraCoreSampleApp\ChakraCoreHost\ChakraCoreSimulation.cs:line 70
at ChakraCoreHost.Helper.ExecuteAction(Stopwatch stopwatch, Action action, String eventName) in E:\ChakraCoreSampleApp\ChakraCoreHost\Helper.cs:line 43
at ChakraCoreHost.ChakraCoreSimulation.ExecutedSerializedScript(Int32 max) in E:\ChakraCoreSampleApp\ChakraCoreHost\ChakraCoreSimulation.cs:line 67
at ChakraCoreHost.Program.Main(String[] arguments) in E:\ChakraCoreSampleApp\ChakraCoreHost\ChakraCoreHost.cs:line 10
```
public void ExecutedSerializedScript(int max=1)
{
Console.Error.WriteLine("** starting serializing script **");
var serializedScripts = new List<byte[]>();
var attributes = GetAttributes();
using (var runtime = JavaScriptRuntime.Create(attributes, JavaScriptRuntimeVersion.VersionEdge, null))
{
var context = runtime.CreateContext();
using (new JavaScriptContext.Scope(context))
{
foreach (var scriptName in Helper.Library)
{
byte[] buffer = null;
Console.Write(scriptName);
this.GenerateSerializedScript(Helper.LoadFile(scriptName), ref buffer);
serializedScripts.Add(buffer);
}
}
Console.WriteLine("**** end of script Serialization *****");
}
Console.WriteLine("**** start executing serialized scripts *****");
var result = JavaScriptValue.Invalid;
for (var i = 0; i < max; i++)
{
Console.WriteLine("Iteration : " + i);
using (var runtime = JavaScriptRuntime.Create(attributes, JavaScriptRuntimeVersion.VersionEdge, null))
{
var context = runtime.CreateContext();
using (new JavaScriptContext.Scope(context))
{
try
{
for (var index = 0; index < serializedScripts.Count; index++)
{
Helper.ExecuteAction(this.stopwatch,
() =>
{
Native.JsRunSerializedScript(Helper.LoadFile(Helper.Library[index]), serializedScripts[index], this.currentSourceContext++, string.Empty, out result);
},
Helper.Library[index]);
}
Helper.ExecuteAction(this.stopwatch,
() =>
{
JavaScriptContext.RunScript(Helper.DataScript, this.currentSourceContext++, String.Empty);
},
"DataScript");
Helper.ExecuteAction(this.stopwatch,
() =>
{
result = JavaScriptContext.RunScript(Helper.RenderScript,
this.currentSourceContext++, String.Empty);
});
}
catch (Exception e)
{
Console.Error.WriteLine("chakrahost: failed to run script: {0}", e.Message);
}
finally
{
File.WriteAllText("SerializedOutput." + i + ".html", result.ToString());
}
}
}
Console.Error.WriteLine("** ending serialized chakracore example **");
}
}
```
Program.cs
```
public static class Program
{
public static void Main(string[] arguments)
{
var cs = new ChakraCoreSimulation();
// no issue executing script as plain string
// cs.ExecutePlainScript(1000); // no issue
cs.ExecutedSerializedScript(1000); // app crash
}
}
```
I would appreciate if someone take a look and what I am doing wrong on executing serialized script.
If I execute JavaScript as plainString then there is no issue
|
app crash while executing same Serialized Scirpt multiple times. Exception : System.AccessViolationException:
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5355/comments
| 6 |
2018-06-23T01:07:18Z
|
2018-06-26T01:02:04Z
|
https://github.com/chakra-core/ChakraCore/issues/5355
| 335,054,944 | 5,355 |
[
"chakra-core",
"ChakraCore"
] |
We have some code that calls JsCreateExternalObject (through the .NET wrapper) to get a reference to external C# objects. It works fine most of the time, but it looks like one time it returned ArgumentNotObject. Is there any valid scenario where this error would be returned from this method?
I looked at the [implementation](https://github.com/Microsoft/ChakraCore/blob/6c2c8a78420e9bcc0b126ea05a6f17237aff3415/lib/Jsrt/Jsrt.cpp#L1331), and it seems this error can be returned from [VALIDATE_INCOMING_OBJECT](https://github.com/Microsoft/ChakraCore/blob/6c2c8a78420e9bcc0b126ea05a6f17237aff3415/lib/Jsrt/Jsrt.cpp#L1331) in `JsCreateExternalObjectWithPrototype`, but the `prototype` value should be JS_INVALID_REFERENCE, and this check shouldn't be executed. Could the error be related to the `data` parameter that we are passing in?
The version of ChakraCore is 1.8.4.
|
JsCreateExternalObject returns ArgumentNotObject
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5353/comments
| 9 |
2018-06-22T21:28:21Z
|
2018-06-27T03:50:13Z
|
https://github.com/chakra-core/ChakraCore/issues/5353
| 335,024,403 | 5,353 |
[
"chakra-core",
"ChakraCore"
] |
At the May 2018 TC39 meeting, consensus was reached to rename Atomics.wake to Atomics.notify (while the API is temporarily disabled).
The spec change can be found here: https://github.com/tc39/ecma262/pull/1220
|
Rename Atomics.wake to Atomics.notify per ES standard change
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5349/comments
| 1 |
2018-06-22T16:29:09Z
|
2018-06-26T19:16:45Z
|
https://github.com/chakra-core/ChakraCore/issues/5349
| 334,942,460 | 5,349 |
[
"chakra-core",
"ChakraCore"
] |
For the following test case:
```js
function getF() { return f; }
{
if (getF() === f) {
print('Global var set before evaluating function declaration');
}
function f() { return "bar"; }
}
```
I see:
```
#### ch
Global var set before evaluating function declaration
#### sm
#### v8
#### jsc
Global var set before evaluating function declaration
```
According to [B3.3.2](https://tc39.github.io/ecma262/#sec-web-compat-globaldeclarationinstantiation), the global "var" binding should be initialized to undefined, and only set to the block-level value of f when the function declaration is evaluated.
|
Global var set before evaluating function declaration in non-strict block
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5340/comments
| 8 |
2018-06-20T23:15:46Z
|
2018-06-27T23:08:11Z
|
https://github.com/chakra-core/ChakraCore/issues/5340
| 334,281,826 | 5,340 |
[
"chakra-core",
"ChakraCore"
] |
After some fuzz testing, I found crashing test case.
Git HEAD: 0fe9eb90a69fa4d148013241276d1824676f628e
OS: Ubuntu 18.04 x64
Compiler: clang / clang++ 6.0.0, installed from repo
Crashing test case: `function o(){}async function af0(a){await 0;return await arguments/**/}async function a(){0()}af0();function f(){}function Run(){}WScript.Attach(Run);WScript`
To reproduce: `ch chakra_iw.js`
Valgrind Report (full report at https://gist.github.com/fumfel/40e2070f6af7e0974cdf6b7191186141):
```
==27512== Memcheck, a memory error detector
==27512== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==27512== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==27512== Command: ./ch chakra_iw.js
==27512==
==27512== Warning: set address range perms: large range [0x59e43000, 0x859e43000) (noaccess)
==27512== Warning: set address range perms: large range [0x59e43000, 0x859e43000) (noaccess)
==27512== Warning: set address range perms: large range [0x59e50000, 0x859e50000) (noaccess)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SNIP! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==27512== Invalid write of size 1
==27512== at 0x8ADF149: ThreadContext::SetNoJsReentrancy(bool) (ThreadContext.h:1781)
==27512== by 0x97EB247: Js::JavascriptExceptionOperators::ThrowExceptionObjectInternal(Js::JavascriptExceptionObject*, Js::ScriptContext*, bool, bool, void*, bool) (JavascriptExceptionOperators.cpp:1273)
==27512== by 0x97E9FD0: Js::JavascriptExceptionOperators::ThrowExceptionObject(Js::JavascriptExceptionObject*, Js::ScriptContext*, bool, void*, bool) (JavascriptExceptionOperators.cpp:1345)
==27512== by 0x982316E: Js::JavascriptOperators::OP_ResumeYield(Js::ResumeYieldData*, Js::RecyclableObject*) (JavascriptOperators.cpp:9876)
==27512== by 0x979418B: Js::InterpreterStackFrame::OP_ResumeYield(void*, unsigned int) (InterpreterStackFrame.cpp:9240)
==27512== by 0x9608B58: Js::InterpreterStackFrame::ProcessWithDebugging() (InterpreterHandler.inl:388)
==27512== by 0x95E550D: Js::InterpreterStackFrame::DebugProcess() (InterpreterStackFrame.cpp:2340)
==27512== by 0x95E4AE8: Js::InterpreterStackFrame::InterpreterHelper(Js::ScriptFunction*, Js::ArgumentReader, void*, void*, Js::InterpreterStackFrame::AsmJsReturnStruct*) (InterpreterStackFrame.cpp:1966)
==27512== by 0x95E3D17: Js::InterpreterStackFrame::InterpreterThunk(Js::JavascriptCallStackLayout*) (InterpreterStackFrame.cpp:1688)
==27512== by 0x41B0F99: ???
==27512== by 0x9CAC2DD: amd64_CallFunction (JavascriptFunctionA.S:100)
==27512== by 0x99E7BBD: void* Js::JavascriptFunction::CallFunction<true>(Js::RecyclableObject*, void* (*)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) (JavascriptFunction.cpp:1346)
==27512== Address 0x800c0000000000e9 is not stack'd, malloc'd or (recently) free'd
==27512==
==27512==
==27512== Process terminating with default action of signal 11 (SIGSEGV)
==27512== General Protection Fault
==27512== at 0x8ADF149: ThreadContext::SetNoJsReentrancy(bool) (ThreadContext.h:1781)
==27512== by 0x97EB247: Js::JavascriptExceptionOperators::ThrowExceptionObjectInternal(Js::JavascriptExceptionObject*, Js::ScriptContext*, bool, bool, void*, bool) (JavascriptExceptionOperators.cpp:1273)
==27512== by 0x97E9FD0: Js::JavascriptExceptionOperators::ThrowExceptionObject(Js::JavascriptExceptionObject*, Js::ScriptContext*, bool, void*, bool) (JavascriptExceptionOperators.cpp:1345)
==27512== by 0x982316E: Js::JavascriptOperators::OP_ResumeYield(Js::ResumeYieldData*, Js::RecyclableObject*) (JavascriptOperators.cpp:9876)
==27512== by 0x979418B: Js::InterpreterStackFrame::OP_ResumeYield(void*, unsigned int) (InterpreterStackFrame.cpp:9240)
==27512== by 0x9608B58: Js::InterpreterStackFrame::ProcessWithDebugging() (InterpreterHandler.inl:388)
==27512== by 0x95E550D: Js::InterpreterStackFrame::DebugProcess() (InterpreterStackFrame.cpp:2340)
==27512== by 0x95E4AE8: Js::InterpreterStackFrame::InterpreterHelper(Js::ScriptFunction*, Js::ArgumentReader, void*, void*, Js::InterpreterStackFrame::AsmJsReturnStruct*) (InterpreterStackFrame.cpp:1966)
==27512== by 0x95E3D17: Js::InterpreterStackFrame::InterpreterThunk(Js::JavascriptCallStackLayout*) (InterpreterStackFrame.cpp:1688)
==27512== by 0x41B0F99: ???
==27512== by 0x9CAC2DD: amd64_CallFunction (JavascriptFunctionA.S:100)
==27512== by 0x99E7BBD: void* Js::JavascriptFunction::CallFunction<true>(Js::RecyclableObject*, void* (*)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) (JavascriptFunction.cpp:1346)
==27512==
==27512== HEAP SUMMARY:
==27512== in use at exit: 9,975,877 bytes in 647 blocks
==27512== total heap usage: 895 allocs, 248 frees, 19,648,811 bytes allocated
==27512==
==27512== LEAK SUMMARY:
==27512== definitely lost: 0 bytes in 0 blocks
==27512== indirectly lost: 0 bytes in 0 blocks
==27512== possibly lost: 1,488 bytes in 6 blocks
==27512== still reachable: 9,974,389 bytes in 641 blocks
==27512== suppressed: 0 bytes in 0 blocks
==27512== Rerun with --leak-check=full to see details of leaked memory
==27512==
==27512== For counts of detected and suppressed errors, rerun with: -v
==27512== Use --track-origins=yes to see where uninitialised values come from
==27512== ERROR SUMMARY: 8245 errors from 20 contexts (suppressed: 0 from 0)
```
|
Invalid write in ThreadContext::SetNoJsReentrancy()
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5338/comments
| 3 |
2018-06-20T12:56:09Z
|
2018-07-18T18:29:49Z
|
https://github.com/chakra-core/ChakraCore/issues/5338
| 334,064,352 | 5,338 |
[
"chakra-core",
"ChakraCore"
] |
I have the chakracore hosted in a windows application. I 'm running a JS script with defined a function r(v). The script throws the error: 'object expected' when the r() function is called. So it seems that r() is a predefined chakra function. Am I correct ?
How can I fix the problem ?
|
Problem with r(v) function
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5333/comments
| 3 |
2018-06-19T21:11:00Z
|
2018-06-22T17:08:41Z
|
https://github.com/chakra-core/ChakraCore/issues/5333
| 333,840,469 | 5,333 |
[
"chakra-core",
"ChakraCore"
] |
https://github.com/Microsoft/ChakraCore/blob/99f04016d044360b637a654a274c167d026cb020/lib/Common/Core/FaultInjection.cpp#L153
|
RtlVirtualUnwind last parameter is optional and not needed here.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5314/comments
| 0 |
2018-06-14T07:37:26Z
|
2018-10-09T20:47:18Z
|
https://github.com/chakra-core/ChakraCore/issues/5314
| 332,284,769 | 5,314 |
[
"chakra-core",
"ChakraCore"
] |
This code will log `1, 2, 3` on chakra. On v8, it will log `2, 3, 1`. Believe that the difference here is Chakra is not creating a new promise for the await. Spec section on [await](https://tc39.github.io/ecma262/#await) claims that we should be creating two new promises when we await, but we're only creating one.
```javascript
async function f2() {
return 1;
}
async function f1() {
let i = await f2();
console.log(i);
}
let p = f1();
Promise.resolve(2).then(() => {
console.log(2);
Promise.resolve(3).then(() => {
console.log(3);
});
});
```
Edit: My understanding from talking w/ folks is that Chakra's implementation of async/await predates the spec. It's currently a bit difficult to map the implementation to the spec language.
|
Review Implementation of Async/Await
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5293/comments
| 14 |
2018-06-11T20:21:20Z
|
2019-11-24T18:38:22Z
|
https://github.com/chakra-core/ChakraCore/issues/5293
| 331,335,540 | 5,293 |
[
"chakra-core",
"ChakraCore"
] |
Let's imagine that I'm building a game and I want to handle a specific part of the game using code processed by ChakraCore. How would I invoke JS and take all of it's advantages and also build bindings so this JS code could access other bindings to other functionality of the game framework? Is it possible or I'm talking nonsense? If not, can somebody guide me to the right direction? Just so you know, the game framework would be written in C/C++.
Best regards
|
Is it possible to embed ChakraCore in a game framework?
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5289/comments
| 2 |
2018-06-11T04:39:12Z
|
2018-06-22T00:27:59Z
|
https://github.com/chakra-core/ChakraCore/issues/5289
| 331,043,385 | 5,289 |
[
"chakra-core",
"ChakraCore"
] |
```js
function a() {}
const p1 = new Proxy(a, {})
console.log(typeof p1) // "function"
const p2 = new Proxy(p1, {})
console.log(typeof p2) // "object" but should be "function"
```
|
A function wrapped in 2 or more proxies is seen as `typeof` a `object`.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5282/comments
| 2 |
2018-06-07T20:38:48Z
|
2018-06-19T18:37:11Z
|
https://github.com/chakra-core/ChakraCore/issues/5282
| 330,427,046 | 5,282 |
[
"chakra-core",
"ChakraCore"
] |
TL;DR:
`eshost` needs a way to invoke `ch` with a flag that instructs `ch` to treat the `<source file>` as module code. e.g. `ch -module source.js`
All other ECMAScript hosts presently expose a flag that enables this "mode":
| Engine | Host | Existing Mechanism |
| ---- | ---- | ---------------------|
| ChakraCore | ch | Must wrap source in a call to `WScript.LoadModule(code)` or `WScript.LoadScriptFile(file, 'module')` \* |
| JavaScriptCore | jsc | `jsc -m source.js` |
| SpiderMonkey | jsshell | `js --module source.js` |
| V8 | d8 | `d8 --module source.js` |
| XS | xs | `xs -m source.js` |
|
Test262/eshost runtime feature request: -module flag for ch
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5274/comments
| 10 |
2018-06-06T15:00:36Z
|
2018-06-26T15:45:17Z
|
https://github.com/chakra-core/ChakraCore/issues/5274
| 329,907,369 | 5,274 |
[
"chakra-core",
"ChakraCore"
] |
Hello!
I've been trying my own hand at implementing `$262.agent.monotonicNow()` (as a function exposed on `WScript` when `-Test262` is used), which is necessary for testing Atomic operations that involve wait/wake with specified timeouts. I was attempting to use `std::chrono::steady_clock` with the appropriate included, but that results in the following `no member named 'PAL_ctime' in the global namespace`. I'm all out of ideas :|
|
Test262 Agent feature request: $262.agent.monotonicNow()
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5271/comments
| 3 |
2018-06-05T20:03:17Z
|
2021-04-30T15:11:34Z
|
https://github.com/chakra-core/ChakraCore/issues/5271
| 329,604,645 | 5,271 |
[
"chakra-core",
"ChakraCore"
] |
While writing Test262 tests for dynamic import, I discovered the following incompatibility:
```js
import()
```
Should produce a SyntaxError, given the grammar:
`import (` _AssignmentExpression_ `)`
Does not expand to `import()`
|
Dynamic Imports: import() must produce a SyntaxError
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5270/comments
| 6 |
2018-06-05T17:33:40Z
|
2018-06-06T18:35:16Z
|
https://github.com/chakra-core/ChakraCore/issues/5270
| 329,555,444 | 5,270 |
[
"chakra-core",
"ChakraCore"
] |
`navigator.plugins` object behaves in an odd way in certain edge cases.
I suppose the specification relevant for the `navigator.plugins` object is https://heycam.github.io/webidl/#es-legacy-platform-objects, and https://html.spec.whatwg.org/multipage/#pluginarray . Since these do not specify whether the object should "support named property setters" and what "named property visibility algorithm" should the object use, I suppose the behavior of the object can be largely platform-dependent.
However, even assuming this, there seem to be some weirdness coming into play in situations described below:
When the following script is executed:
```js
var plugins = navigator.plugins;
plugins.propertyIsEnumerable('Edge PDF Viewer') // true!
Object.defineProperty(plugins, 1e9, {
value: null,
configurable: true
});
delete plugins[1e9];
plugins['Edge PDF Viewer'] = {};
delete plugins['Edge PDF Viewer'];
plugins.propertyIsEnumerable('Edge PDF Viewer') // false!
```
the _named property_ `"Edge PDF Viewer"`, which is enumerable at beginning, suddenly becomes a non-enumerable property of the plugins object. This is weird, because in usual situation where one defines some properties on the plugin object and deletes it afterwards, it recovers the exact same property descriptor which it had at the beginning. However, in this case, it recovers a descriptor that is the same to the original one _except_ the `enumerable` key changed from `true` to `false`.
`1e9` can be changed to any number that exceeds `navigator.plugins.length`. The issue disappears when changing it to a number less than `navigator.plugins.length`.
Also, if the temporary property descriptor is changed to have _both_ `writable` and `enumerable` attribute, the issue disappears as well:
```js
var plugins = navigator.plugins;
plugins.propertyIsEnumerable('Edge PDF Viewer') // true!
Object.defineProperty(plugins, 1e9, {
value: null,
writable: true,
enumerable: true,
configurable: true
});
delete plugins[1e9];
plugins['Edge PDF Viewer'] = {};
delete plugins['Edge PDF Viewer'];
plugins.propertyIsEnumerable('Edge PDF Viewer'); // true now!
```
[Edit - changed misspelled "Edge PDF Plugin"s to "Edge PDF Viewer"]
|
navigator.plugins object's named property become non-enumerable on certain circumstances
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5263/comments
| 7 |
2018-06-04T09:34:25Z
|
2018-11-30T00:30:41Z
|
https://github.com/chakra-core/ChakraCore/issues/5263
| 328,978,900 | 5,263 |
[
"chakra-core",
"ChakraCore"
] |
Don't know whether this is known or not but I figured I'd bring it up in case this was a bug or oversight: I've found that when inspecting values using the debugger API (for example, a result of JsDiagEvaluate), for at least `NaN` and +/- `Infinity`, these values are provided directly as the "value" property of the serialized object. NaN and Infinity are not encodable in JSON and will be coerced to `null` (losing information) if the object is actually converted to JSON.
|
Debug protocol is not 100% JSON compliant
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5262/comments
| 8 |
2018-06-03T17:27:53Z
|
2018-06-07T00:53:38Z
|
https://github.com/chakra-core/ChakraCore/issues/5262
| 328,846,223 | 5,262 |
[
"chakra-core",
"ChakraCore"
] |
In react native apps there are usually 1-3K elements stored in the [instanceCache](https://github.com/facebook/react-native/blob/master/Libraries/Renderer/oss/ReactNativeRenderer-prod.js#L988) array. Pattern: declared as an object/dictionary, used as an array, frequent add/delete operations, indexes grow continuously (i.e. they are not random hash values). This causes Chakra to create a highly sparse array.
This array in snapshot 1 (note, that in JS it's an object, but Chakra represents it as an array):
```
1 2 ^ v > | 0x0000015b4bb56440 (level -1 ) = (??) (!jd.var) Chakra!Js::JavascriptArray
1 257 ^ v * | 0x0000015b50e6d020 (level 0 ) Js::JavascriptArray.{SparseArraySegments}
0:016> dt Js::SparseArraySegmentBase 0x0000015b50e6d020
Chakra!Js::SparseArraySegmentBase
+0x000 left : 0
+0x004 length : 0x80b
+0x008 size : 0xc7f
+0x010 next : (null)
```
Then the same array in snapshot 2, after a lot of activity in the UI (note, that the sparse array segment has been replaced):
```
1 2 ^ v > | 0x0000015b4bb56440 (level -1 ) = (??) (!jd.var) Chakra!Js::JavascriptArray
1 257 ^ v * | 0x0000015b5ba60020 (level 0 ) Js::JavascriptArray.{SparseArraySegments}
0:015> dt Js::SparseArraySegmentBase 0x0000015b5ba60020
Chakra!Js::SparseArraySegmentBase
+0x000 left : 0
+0x004 length : 0x857b
+0x008 size : 0xa0af
+0x010 next : (null)
```
The heap usage as reported by `!hbstats` was below 40%.
Defragmenting can be done on JS side with `instanceCache = {...instanceCache}`. This bumped the heap usage to 75% and packed the array size to a more reasonable value:
```
1 2 ^ v > | 0x00000226c5141b40 (level -1 ) = (??) (!jd.var) Chakra!Js::JavascriptArray
1 3345 ^ v * | 0x00000226d5347020 (level 0 ) Js::JavascriptArray.{SparseArraySegments}
0:011> !jd.var 0x00000226c5141b40
Js::JavascriptArray * 0x00000226c5141b40 (TypeIds_Array)
class Js::SparseArraySegmentBase * 0x00000226`d5347020
+0x000 left : 0
+0x004 length : 0xd1c
+0x008 size : 0x14d3
+0x010 next : (null)
```
|
High heap fragmentation caused by sparse arrays
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5261/comments
| 1 |
2018-06-02T02:38:23Z
|
2018-06-14T01:03:07Z
|
https://github.com/chakra-core/ChakraCore/issues/5261
| 328,705,754 | 5,261 |
[
"chakra-core",
"ChakraCore"
] |
Hey,
I wrote a simple ChakraCore [app](https://github.com/SiamAbdullah/sampleChakraCoreApp.git) where I executed a method over 100K times and I observed JSRuntimeMemoryUsage increase over period of execution.
public static void Main(string[] arguments)
{
using (var runtime = JavaScriptRuntime.Create(JavaScriptRuntimeAttributes.None, JavaScriptRuntimeVersion.VersionEdge, null))
{
JavaScriptContext context = runtime.CreateContext();
//
// Now set the execution context as being the current one on this thread.
//
using (new JavaScriptContext.Scope(context))
{
string script = "function GetNumber(){return 1;}";
string runMethod = "GetNumber();";
var max = 100000;
var i = 0;
JavaScriptValue result;
try
{
JavaScriptContext.RunScript(script, currentSourceContext++, String.Empty);
while (i++ < max)
{
result = JavaScriptContext.RunScript(runMethod, currentSourceContext++, String.Empty);
result.Release();
Console.WriteLine(i + "," + runtime.MemoryUsage);
}
}
catch (JavaScriptScriptException e)
{
PrintScriptException(e.Error);
}
catch (Exception e)
{
Console.Error.WriteLine("chakrahost: failed to run script: {0}", e.Message);
}
}
}
}
Is this expected ? Why does [runtime memory usage](https://github.com/SiamAbdullah/sampleChakraCoreApp/blob/master/memoryUsage.txt) increase even though i just call the Javascript method which is doing nothing ? I would really appreciate if anyone help me to understand the background chakracore work.
|
Increase JSRuntimeMemoryUsage for a static script
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5259/comments
| 3 |
2018-06-01T23:40:22Z
|
2018-06-04T22:53:37Z
|
https://github.com/chakra-core/ChakraCore/issues/5259
| 328,690,048 | 5,259 |
[
"chakra-core",
"ChakraCore"
] |
I'm trying to make ChakraCore running on arm64 properly. Although it seems to ChakraCore doesn't support arm64 officially (at least can't build for arm64 using build script), but the codes for arm64 is almost ready in code base except for unixasmmacrosarm64.inc is used by others but doesn't exist in the project.
What is the good way to complement these missing files to ChakraCore code base? Can't build it for arm64 without unixasmmacrosarm64.inc
|
Source code is missing for arm64 build
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5243/comments
| 8 |
2018-05-29T18:11:45Z
|
2018-05-31T19:51:25Z
|
https://github.com/chakra-core/ChakraCore/issues/5243
| 327,431,008 | 5,243 |
[
"chakra-core",
"ChakraCore"
] |
Is there any plans to implement code cache which is used by V8 (https://v8project.blogspot.in/2015/07/code-caching.html)?
|
Code cache
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5241/comments
| 3 |
2018-05-29T03:31:55Z
|
2018-05-31T19:50:36Z
|
https://github.com/chakra-core/ChakraCore/issues/5241
| 327,159,539 | 5,241 |
[
"chakra-core",
"ChakraCore"
] |
Note, I have a working implementation/proof of concept of this proposal that passes all existing module tests.
See this commit for CC changes https://github.com/rhuanjl/ChakraCore/commit/db4daf7b1e21c952c6bd256291f987f0fd428069 and
See this commit for adding it to ch https://github.com/rhuanjl/ChakraCore/commit/cb316f62575ed02920bc774cc87663d3daa6790a
**Background**
I spent some time looking at ways of implementing ESModules in node-chakracore but noted that:
1. the v8 module loading API is much lower level than the CC api
2. node is trying to do lots of things that CC wouldn't need it to do
3. trying to implement ESModules in node-cc with the current API was going to be incredibly convoluted and fragile and possibly futile
Therefore CC needs a revised module API for node ESModule support to become a thing (unless a wrapper could be written around the v8 api instead - you could shim CC's API over v8's relatively easily I think)
However - from having worked with it I think that CC's API is a far nicer API than v8's so for anyone else embedding CC and using ESModules I think it would be a shame if CC's API had to be changed to reflect v8's on this.
**Proposal**
- leave the existing API as is
- implement a secondary/alternate module loading pathway compatible with v8's API
- have a switch that can be set at runtime to specify which one is being used
**Detailed Idea for alternate pathway**
1. Add JsModuleDeferLink as an option to JsSetModuleHostInfo - if you wish to use this alternate API you must set this on every module (may be better set at context level but couldn't see a convenient way to do that)
2. Modifies JsParseModuleSource when DeferLink is set on the module to:
- Parse the source
- obtain the list of dependencies
- but not fire any callbacks and
- not proceed to Instantiation
3. Adds ProvideModuleForInstantiationCallback callback that can be set via JsSetModuleHostInfo - this callback should fetch an already parsed module dependency and error if it's not already parsed.
4. Reduce the scope of the existing Fetch callbacks as the entry points for dynamic import() only
5. Add API JsGetImportCount which tells how many dependencies a module has
6. Add API JsGetIndexedImport which tells the name of a dependency
7. Add API JsInstantiateModule Which does the linking together and instantiation of a module and its dependencies but errors if anything wasn't already Parsed.
8. Disables the NotifyModuleReadyCallback as the host will be manually calling JsInstantiateModule they'll know when to call JsEvaluateModule as well.
Using these APIs a lot of the work that would be done inside CC with the existing API has to be done by the host most notably:
1. iterating over the list of dependencies to determine what to fetch
2. tracking when all modules are parsed (and hence when ready to Instantiate)
But this is exactly what v8's API requires and hence what node already does.
**Other notes**
Currently you need to know if a module is a root module or not when you first create it which I don't think v8 does - I think I can change this with a little more tweaking, will fix this point if there's interest in this proposal.
I haven't yet got a version of node-chakracore working with this - but if there's interest in this proposal I should be able to do that relatively easily as this alternate API basically mirror's v8's so should be able to offer a PR to implement that in 2-3 weeks.
|
Proposal: implement seperate/additional module API for node-chakracore
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5240/comments
| 6 |
2018-05-27T23:35:23Z
|
2020-12-12T15:31:22Z
|
https://github.com/chakra-core/ChakraCore/issues/5240
| 326,861,133 | 5,240 |
[
"chakra-core",
"ChakraCore"
] |
Hi team,
Quick question, I've spent many hours trying to compile the shared library with AddressSanitizer, however I'm not having luck. Am running on Ubuntu 16.04.4 x64 with clang 7 using the following command:
```./build.sh --cxx=/usr/bin/clang++ --cc=/usr/bin/clang --sanitize=address```
Once the compilation is finished am getting the following error:
```
symeon@ubuntu:~/Desktop/ChakraCore/out/Release$ ./ch sample.js
dlopen() failed; dlerror says '/home/symeon/Desktop/ChakraCore/out/Release/libChakraCore.so: undefined symbol: __asan_option_detect_stack_use_after_return'
FATAL ERROR: Unable to load /home/symeon/Desktop/ChakraCore/out/Release/libChakraCore.so GetLastError=0x7e
```
Running the nm command reveals that the symbols for the library are not properly exported (they're undefined):
```
symeon@ubuntu:~/Desktop/ChakraCore/out/Release$ nm libChakraCore.so | grep asan_
U __asan_addr_is_in_fake_stack
U __asan_after_dynamic_init
U __asan_alloca_poison
U __asan_allocas_unpoison
U __asan_before_dynamic_init
U __asan_get_current_fake_stack
U __asan_handle_no_return
U __asan_init
U __asan_load1
U __asan_loadN
U __asan_memcpy
U __asan_memmove
U __asan_memset
U __asan_option_detect_stack_use_after_return
--- snip ---
```
I've tried modifying directly the CMakeLists.txt and adding there the ```-fsanitize=address```, as well as ```-shared-libasan``` which then wouldn't compile successfully. Has anyone manage to get it working? Thanks!
|
Cannot instrument libChakraCore.so with AddressSanitizer
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5239/comments
| 4 |
2018-05-27T10:46:21Z
|
2018-05-31T19:50:05Z
|
https://github.com/chakra-core/ChakraCore/issues/5239
| 326,805,719 | 5,239 |
[
"chakra-core",
"ChakraCore"
] |
For comparison of esmodule behavior to any other environment imports should really be relative to the current module. (e.g. to investigate #5171 I had to use @fatcerberus miniSphere as my test harness to be able to try and load the ESM version of moment.js as it assumed relative imports so could not test in ch)
Currently in ch all imports are relative to the CWD instead.
I note that there was a previous issue about this #3257 which was fixed BUT since then the behaviour has been reverted.
There was a test case to confirm that imports were relative to current module not CWD https://github.com/Microsoft/ChakraCore/blob/master/test/es6module/bug_issue_3257.js But after it was broken a few times it was re-enabled without paths and hence no longer tested the original issue. (Though it remains a very useful test of circular imports combined with dynamic import)
|
Module imports in ch should be relative to the current module
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5237/comments
| 2 |
2018-05-26T15:34:52Z
|
2018-11-01T01:05:42Z
|
https://github.com/chakra-core/ChakraCore/issues/5237
| 326,746,685 | 5,237 |
[
"chakra-core",
"ChakraCore"
] |
Raising this as a separate issue from #5171 though it's related. #5171 was specifically talking about a regression - the only change having been module load order.
But this is the reason why the load order mattered in that case - in CC module function exports are not treated as hoistable exports. (In fact I don't think CC has a concept of a hoistable export)
Illustration:
```js
//a.js
import "./b.js";
console.log("a.js");
export function func(){}
//b.js
import {func} from "./a.js";
console.log("b.js");
console.log(func);
```
Results
1. Load a.js:
```
b.js
undefined
a.js
```
2. Load b.js
```
a.js
b.js
function func(){}
```
Conversely if you change them to .mjs and run with node:
Results
1. Load a.mjs:
```
b.mjs
[Function: func]
a.mjs
```
2. Load b.mjs
```
a.mjs
b.mjs
[Function: func]
```
The function export from a.js gets hoisted under v8 so the function is available at run time whichever way around you load the modules whereas under CC it is not hoisted and so you have to get your load order right in circular cases to avoid it being undefined.
|
Module function exports not hoisted
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5236/comments
| 5 |
2018-05-26T10:05:56Z
|
2019-07-03T22:05:57Z
|
https://github.com/chakra-core/ChakraCore/issues/5236
| 326,726,607 | 5,236 |
[
"chakra-core",
"ChakraCore"
] |
Minimum repro:
```javascript
class A {}
const p = new Proxy(A, {});
Reflect.construct(p, [], A);
```
My VSO branch user/sethb/bound-class-2 has a bunch of new test cases based on suggestions in #5218. I think all of the failures boil down to this same problem. Reflect.construct passes new.target as an extra arg on the end, but the class constructor expects new.target as arg zero. Proxy probably needs to be responsible for putting the argument in the correct place when calling a class constructor. Current behavior is that the class constructor tries to get function info about arg zero (some newly-initialized object), and throws "TypeError: Object doesn't support this action".
|
Exception when constructing proxied class
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5225/comments
| 2 |
2018-05-24T16:18:20Z
|
2018-07-26T23:15:49Z
|
https://github.com/chakra-core/ChakraCore/issues/5225
| 326,195,099 | 5,225 |
[
"chakra-core",
"ChakraCore"
] |
[This proposal](https://github.com/tc39/proposal-optional-catch-binding) is now in stage 4, and is being used in node.js core.
|
optional catch binding
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5210/comments
| 0 |
2018-05-22T18:58:37Z
|
2018-10-31T23:12:01Z
|
https://github.com/chakra-core/ChakraCore/issues/5210
| 325,422,414 | 5,210 |
[
"chakra-core",
"ChakraCore"
] |
Hi everyone,
it was observed that Chakra throws a SyntaxError when we use the `for...in` statement with `yield` inside a generator function.
OS: Ubuntu 16.04 x64
Chakra Version: 1.10.0.0-beta
Step to reproduce:
```
function* g1() {
for (var x = yield in {}) ;
}
var it = g1();
```
Actual result:
```
SyntaxError: Syntax error
```
Expected result:
```
Pass without failures
```
V8, SpiderMonkey and JavascriptCore works as expected.
cinfuzz
|
Chakra throws a SyntaxError on for...in statement
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5203/comments
| 4 |
2018-05-21T12:55:07Z
|
2018-08-07T11:49:48Z
|
https://github.com/chakra-core/ChakraCore/issues/5203
| 324,905,958 | 5,203 |
[
"chakra-core",
"ChakraCore"
] |
Template literal caching was changed in https://github.com/tc39/ecma262/pull/890 to cache per source location, rather than by literal string contents.
V8, SpiderMonkey and JSC all seem to implement the new semantics.
This behavior is very important to template tag functions that caching work based on templates.
1) Because with the old global behavior keying by template literal would cause a memory leak.
2) If the cache is supposed to be keyed by site there's no fast way for userland code to do it.
|
Cache template literals per site, not by contents
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5201/comments
| 2 |
2018-05-20T00:29:47Z
|
2018-09-26T00:01:23Z
|
https://github.com/chakra-core/ChakraCore/issues/5201
| 324,671,805 | 5,201 |
[
"chakra-core",
"ChakraCore"
] |
Clone the latest ChakraCore and build,
```
Error C2220 warning treated as error - no 'object' file generated Chakra.Runtime.Library c:\users\test\desktop\chakracore\lib\runtime\library\jsbuiltin\jsbuiltin.js.bc.32b.h 1
```
But the https://github.com/Microsoft/ChakraCore/releases/tag/v1.8.4 build properly without any error,
IDE: Microsoft Visual Studio Community 2017 Version 15.7.1
OS: Windows 10
|
Build Error on Microsoft Visual Studio Community 2017
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5200/comments
| 1 |
2018-05-19T14:38:46Z
|
2018-05-23T08:06:39Z
|
https://github.com/chakra-core/ChakraCore/issues/5200
| 324,634,418 | 5,200 |
[
"chakra-core",
"ChakraCore"
] |
Encouraged by [a comment in ByteSwap.h][b], I am trying to understand what it would take to build ChakraCore on FreeBSD.
I understand that this might not be a priority, but I will appreciate any pointers or suggestions.
[b]: https://github.com/Microsoft/ChakraCore/blame/master/lib/Common/Common/ByteSwap.h#L72
|
FreeBSD port
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5199/comments
| 10 |
2018-05-19T04:57:24Z
|
2018-11-29T01:53:58Z
|
https://github.com/chakra-core/ChakraCore/issues/5199
| 324,601,361 | 5,199 |
[
"chakra-core",
"ChakraCore"
] |
This is most obvious in repl type environments, but you can also see it with eval:
```js
console.log(eval("var [x] = [1]"));
```
In v8 and spidermonkey this results in undefined, while in chakracore it prints the value of the right hand side.
|
Declarations involving destructuring return the wrong value
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5196/comments
| 3 |
2018-05-18T21:49:32Z
|
2018-07-02T22:44:25Z
|
https://github.com/chakra-core/ChakraCore/issues/5196
| 324,561,962 | 5,196 |
[
"chakra-core",
"ChakraCore"
] |
It appears that we have some rare cases when allocation/free reporting to the allocation manager is not balanced. That causes spurious failures in integration tests.
It does not look like a recent regression. We only started seeing this because we have enabled allocation manager in more scenarios.
At this point we know that there is a problem, so let's disable the asserts temporarily to not block while investigating the root cause(s) for the misbalance.
|
Temporary disable asserts in AllocationPolicyManager
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5191/comments
| 2 |
2018-05-18T17:23:17Z
|
2018-05-31T17:38:39Z
|
https://github.com/chakra-core/ChakraCore/issues/5191
| 324,490,908 | 5,191 |
[
"chakra-core",
"ChakraCore"
] |
Hi, all again :)
I have a problem with the garbage collection.
I need to create and destroy a lot of contexts which use one runtime and after that,
I want to uninitialize my system where I am trying to invoke JsDisposeRuntime,
but it seems that on "ClearObjectBeforeCollectCallbacks" there are still data, but all my resources and data is released.
When I destroy a context I just release it and invoke "JsCollectGarbage(rt)" but the data is still there, why?
Why when I call "JsCollectGarbage(rt)" it doesn't collect everything?
I've written a sample where I've attached a callback which I expect to be invoked on "JsCollectGarbage" but it is invoked on "JsDisposeRuntime".
What can I do to force garbage collection for every unused context?
Foo()
{
JsRuntimeHandle rt = JS_INVALID_REFERENCE;
CHECK_CCRT(JsCreateRuntime(JsRuntimeAttributeNone, nullptr, &rt));
void* data = nullptr;
JsFinalizeCallback finalizeCallback = [](void* call) {
};
{
unsigned cnt = 0;
JsContextRef m_Context = JS_INVALID_REFERENCE;
CHECK_CCRT(JsCreateContext(rt, &m_Context));
CHECK_CCRT(JsSetCurrentContext(m_Context));
CHECK_CCRT(JsAddRef(m_Context, &cnt));
JsValueRef object = JS_INVALID_REFERENCE;
CHECK_CCRT(JsCreateExternalObject(data, finalizeCallback, &object));
CHECK_CCRT(JsSetCurrentContext(nullptr));
CHECK_CCRT(JsRelease(m_Context, &cnt));
}
// Expect to call finalize here
CHECK_CCRT(JsCollectGarbage(rt));
// But it is called here
CHECK_CCRT(JsDisposeRuntime(rt));
}
|
JsCollectGarbage doesn't do a garbage
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5190/comments
| 4 |
2018-05-18T15:35:13Z
|
2018-05-23T14:48:16Z
|
https://github.com/chakra-core/ChakraCore/issues/5190
| 324,457,885 | 5,190 |
[
"chakra-core",
"ChakraCore"
] |
Chakra failed with error C2760 when build with permissive- by msvc on Windows, I use latest source on master branch. Could you please help take a look at this? Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior.
**You can repro this issue as the steps below:**
1.git clone -c core.autocrlf=true https://github.com/microsoft/ChakraCore D:\Chakra\src
2.Open a clean x86 prompt (C:\windows\syswow64\cmd.exe) and browse to D:\Chakra\src
3.set CL=-wd4471 /permissive-
4.msbuild /m /p:Platform=x86 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.16299.0 Build\Chakra.Core.sln /t:Rebuild
**Error info:**
d:\chakra\src\lib\common\DataStructures/ClusterList.h(48): error C2760: syntax error: unexpected token 'identifier', expected ';'
d:\chakra\src\lib\common\DataStructures/ClusterList.h(132): note: see reference to class template instantiation 'ClusterList<indexType,TAllocator>' being compiled
d:\chakra\src\lib\common\DataStructures/ClusterList.h(89): error C2760: syntax error: unexpected token 'identifier', expected ';'
|
Chakra failed with error C2760 when build with permissive- by msvc on Windows
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5189/comments
| 1 |
2018-05-18T08:46:34Z
|
2018-07-18T23:43:59Z
|
https://github.com/chakra-core/ChakraCore/issues/5189
| 324,322,382 | 5,189 |
[
"chakra-core",
"ChakraCore"
] |
OS: Ubuntu 16.04 x86
Chakra: 1.10.0.0-beta
Step to reproduce:
```
// RegExp.prototype with overridden exec: Testing ES6 21.2.5.11: 19.b. Let z be ? RegExpExec(splitter, S).
let accesses = [];
let origDescriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, "exec");
let origExec = origDescriptor.value;
Object.defineProperty(RegExp.prototype, "exec", {
value: function(str) {
accesses.push("exec");
return origExec.call(this, str);
}
});
if (!(accesses == "")) throw new Error("unexpected call to overridden props");
let result = "splitme".split(/it/);
if (!(result == "spl,me")) throw new Error("Unexpecσ ted result");
if (!(accesses == "exec,exec,exec,exec,exec,exec")) throw new Error("Property accessσ ‘es do not match expectation");
```
Actual results:
```
Error: Property accessσ ‘es do not match expectation
```
Expected results:
```
Pass without failures
```
V8, SpiderMonkey and JavascriptCore works as expected.
cinfuzz
|
Chakra cannot override RegExp.prototype.exec property
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5187/comments
| 5 |
2018-05-17T20:25:11Z
|
2020-03-25T08:54:46Z
|
https://github.com/chakra-core/ChakraCore/issues/5187
| 324,172,894 | 5,187 |
[
"chakra-core",
"ChakraCore"
] |
Hi everyone,
Chakra throws a SyntaxError when I instantiate a RegExp class with a pattern that have a long number quantifier prefix, the same occurs with the regular expression literal.
OS: Ubuntu 16.04 x86
Chakra: 1.10.0.0-beta
Step to reproduce:
```
let p1 = new RegExp('^[a-z]{2,2147483648}$');
print(p1.test('a'));
let p2 = /^[a-z]{2,2147483648}$/;
print(p2.test('aaaaa'));
```
Actual results:
```
SyntaxError: Syntax error in regular expression
```
Expected results:
```
false
true
```
V8, SpiderMonkey and JavascriptCore works as expect.
Maybe this stderr output can help to debug:
`ChakraCore/pal/src/cruntime/printfcpp.cpp:70WideCharToMultiByte failed. Error is 487`
cinfuzz
|
Chakra throws SyntaxError if RegExp pattern has a quantifier prefix with a long number
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5182/comments
| 3 |
2018-05-17T17:49:31Z
|
2018-08-07T11:49:38Z
|
https://github.com/chakra-core/ChakraCore/issues/5182
| 324,123,205 | 5,182 |
[
"chakra-core",
"ChakraCore"
] |
Hi all :)
Is it possible to make a native function call from one context where the native function makes a call which switches the context and the runtime? In this example, every context has a different runtime and everything happens on the same thread.
|
Switching a context from different runtime while running a script
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5179/comments
| 3 |
2018-05-17T15:50:39Z
|
2018-05-18T06:46:25Z
|
https://github.com/chakra-core/ChakraCore/issues/5179
| 324,083,331 | 5,179 |
[
"chakra-core",
"ChakraCore"
] |
It's common in JavaScript to find method call chains like the one below, particularly when using query libraries like Lazy.js or jQuery:
```js
doSomething()
.doA()
.doB()
.doC();
```
If one accidentally adds an extra semicolon in the middle of such a chain--a mistake I myself make way too often--like so:
```js
doSomething()
.doA()
.doB();
.doC();
```
The resulting error message is pretty much as vague as they come:
```
SyntaxError: Syntax error
```
|
Uninformative error message for extra semicolon in method chain
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5178/comments
| 9 |
2018-05-17T05:56:56Z
|
2018-10-09T22:53:19Z
|
https://github.com/chakra-core/ChakraCore/issues/5178
| 323,881,884 | 5,178 |
[
"chakra-core",
"ChakraCore"
] |
Hello.
I have recently updated from Edge 16 to Edge 17 and now I began to experience issue with imports from momentjs. You can reproduce this issue easily. Assuming you have installed momentjs from npm, create two files:
**index.html**
```
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<script src="test.js" type="module"></script>
</body>
</html>
```
**test.js**
```
import { getSetHour } from '../node_modules/moment/src/lib/units/hour.js'
console.log(getSetHour);
```
This snippet works fine in chrome and edge 16, but fails in edge 17.
|
Imported function is undefined
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5171/comments
| 18 |
2018-05-16T11:10:50Z
|
2018-06-07T00:09:18Z
|
https://github.com/chakra-core/ChakraCore/issues/5171
| 323,574,549 | 5,171 |
[
"chakra-core",
"ChakraCore"
] |
Hi all, I have a problem when I am trying to switch a context.
I have two contexts in a single runtime and everything is happening on the same thread, but when I am trying to change the current context the operation failed. I am using "JsSetCurrentContext" It seems that there is a running script in the active context and "ThreadContextTLSEntry::ClearThreadContext" returns false. What can I do to change the context? Is it possible an active context to trigger something to happen in a different context?
|
Problem while switching contexts
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5160/comments
| 10 |
2018-05-15T11:51:45Z
|
2018-05-18T06:45:27Z
|
https://github.com/chakra-core/ChakraCore/issues/5160
| 323,183,904 | 5,160 |
[
"chakra-core",
"ChakraCore"
] |
Can ChakraCore on MacOS be built for arm-Windows platform using Visual Studio Community 2017? e.g. arm Chromebook
I import the Build\Chakra.Core.sln into VS 2017 on MacOS, and seems cannot build, occur "This project type is not supported by Visual Studio Community 2017 for Mac".
Thanks.
|
Can ChakraCore on MacOS be built for arm-Windows platform with VS 2017?
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5159/comments
| 3 |
2018-05-15T04:12:49Z
|
2018-05-31T19:49:41Z
|
https://github.com/chakra-core/ChakraCore/issues/5159
| 323,060,427 | 5,159 |
[
"chakra-core",
"ChakraCore"
] |
https://github.com/Microsoft/ChakraCore/pull/5133 added support for skipping nested deferred functions when undeferring but disables the optimization for functions nested inside parent functions with default arguments due to complications with function ordering for such parent functions.
It should be possible to get the nested function ordering correct such that these nested functions can also be skipped.
|
Support skip nested deferred for functions defined in parameter scope
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5156/comments
| 0 |
2018-05-15T00:56:41Z
|
2019-07-17T04:11:04Z
|
https://github.com/chakra-core/ChakraCore/issues/5156
| 323,030,178 | 5,156 |
[
"chakra-core",
"ChakraCore"
] |
Also identify whether the number of closed script engine is high and if the number of pinned object is high and use different fail fast functions as well.
|
Use different fail fast when hitting 3gb limit to improve watson bucketing
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5155/comments
| 0 |
2018-05-14T23:33:52Z
|
2018-06-13T05:19:18Z
|
https://github.com/chakra-core/ChakraCore/issues/5155
| 323,017,028 | 5,155 |
[
"chakra-core",
"ChakraCore"
] |
The following test should pass.
```javascript
function f() { this.b = this.a }
f.prototype.a = 1;
const bound = f.bind({});
function g() { }
g.prototype.a = 2;
const obj = Reflect.construct(bound, [], g);
assert.areEqual(2, obj.a, "prototype should end up correct");
assert.areEqual(2, obj.b, "prototype should be correct during construction");
```
If `newTarget` is supplied, it should be passed unmodified through all of these steps:
* [Reflect.construct](https://tc39.github.io/ecma262/#sec-reflect.construct)
* [Construct](https://tc39.github.io/ecma262/#sec-construct)
* Bound function exotic object [[[Construct]]](https://tc39.github.io/ecma262/#sec-bound-function-exotic-objects-construct-argumentslist-newtarget)
* [Construct](https://tc39.github.io/ecma262/#sec-construct) again
* Function object [[[Construct]]](https://tc39.github.io/ecma262/#sec-ecmascript-function-objects-construct-argumentslist-newtarget)
* [OrdinaryCreateFromConstructor](https://tc39.github.io/ecma262/#sec-ordinarycreatefromconstructor)
|
newTarget ignored when constructing bound function
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5151/comments
| 0 |
2018-05-14T16:33:56Z
|
2018-05-16T18:18:01Z
|
https://github.com/chakra-core/ChakraCore/issues/5151
| 322,892,067 | 5,151 |
[
"chakra-core",
"ChakraCore"
] |
With the source here:
#### a.js
```js
import { B } from './b.js';
export class A {}
console.log("A", A)
console.log("B", B);
console.log("c", c);
```
#### b.js
```js
import { A } from './a.js';
export class B {}
export let c = 1
```
I would expect that loading a.js would throw an error when attempting to console.log("B",B), but instead B is resolved and the error occurs at console.log("c",c).
Spec via
https://tc39.github.io/ecma262/#sec-exports
https://tc39.github.io/ecma262/#prod-Declaration
the ClassDeclaration is not a HoistableDeclaration.
Repro https://jsbin.com/tibulip/1/edit?html,console
|
exported class declarations are treated as hoistable declarations
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5145/comments
| 2 |
2018-05-12T17:55:52Z
|
2018-05-13T16:02:44Z
|
https://github.com/chakra-core/ChakraCore/issues/5145
| 322,530,538 | 5,145 |
[
"chakra-core",
"ChakraCore"
] |
Align with agreed upon limits
https://github.com/WebAssembly/spec/issues/607
|
WASM - Limits
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5141/comments
| 0 |
2018-05-12T00:38:00Z
|
2018-12-15T19:04:34Z
|
https://github.com/chakra-core/ChakraCore/issues/5141
| 322,468,334 | 5,141 |
[
"chakra-core",
"ChakraCore"
] |
After disabling runtime execution the script completes successfully with no error, although I expect ScriptTerminated to be returned. This seems to be happening only when the script has no other commands to execute after runtime execution is disabled. For example, when I try this script, the error is printed as expected (here 'sleep' is a custom callback function that simply does Thread.Sleep, and another thread disables runtime execution after 1 second):
`string script = "(()=>{sleep(2000); return new Date();})()";`
Output:
```
Error code: ScriptTerminated
Return value:
```
But if the script returns a simple string, it completes successfully and no error is returned:
`string script = "(()=>{sleep(2000); return \'Hello world!\';})()";`
Output:
```
Error code: NoError
Return value: Hello world!
```
Is there a way to get a ScriptTerminated error from the script executed in the second example?
|
ScriptTerminated error not returned
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5134/comments
| 10 |
2018-05-11T01:56:20Z
|
2018-05-12T03:08:05Z
|
https://github.com/chakra-core/ChakraCore/issues/5134
| 322,141,866 | 5,134 |
[
"chakra-core",
"ChakraCore"
] |
Hi everyone,
I found an inconsistency when try to evaluate a "for" statement without the body statement.
OS: Ubuntu 16.04 x64
Chakra: 1.10.0.0-beta
Step to reproduce:
```
first = "for (i = 0; i < 3; i++);"
print (eval ( first ) )
second = "for (i = 0; i < 3; i++)"
print (eval ( second ) )
```
Actual results:
```
undefined
undefined
```
Expected results:
```
undefined
SyntaxError: Unexpected end of input
```
I ran the second statement without `eval` function and Chakra passes without throw an Exception also.
```
for (i = 0; i < 3; i++)
```
V8, SpiderMonkey and JavascriptCore works as expected.
cinfuzz
|
Chakra should throw an exception when evaluate an invalid "for" statement
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5128/comments
| 4 |
2018-05-10T15:10:28Z
|
2022-10-15T11:21:54Z
|
https://github.com/chakra-core/ChakraCore/issues/5128
| 321,967,709 | 5,128 |
[
"chakra-core",
"ChakraCore"
] |
We have the following setup: (the objects are created but 'instanceof' does not work)
```
JsValueRef CHAKRA_CALLBACK CommentConstructor(
JsValueRef callee,
bool isConstructCall,
JsValueRef* arguments,
unsigned short argumentCount,
void* callbackState)
{
JsValueRef jsObject;
// Creating the jsObject object with the prototype for the Comment elements. (via JsCreateExternalObjectWithPrototype)
return jsObject;
}
JsValueRef callback = JS_INVALID_REFERENCE;
JsCreateNamedFunction(functionName, &CommentConstructor, nullptr, &callback);
JsValueRef jsPropDesc = JS_INVALID_REFERENCE;
JsCreateObject(&jsPropDesc);
SetChakraCoreProperty(jsPropDesc, "enumerable", MakeChakraCoreBooleanValue(true));
SetChakraCoreProperty(jsPropDesc, "value", callback);
JsValueRef globalObj = JS_INVALID_REFERENCE;
JsGetGlobalObject(&globalObj);
DefineChakraCoreProperty(globalObj, "Comment", jsPropDesc);
```
(where `SetChakraCoreProperty` just sets the property, `DefineChakraCoreProperty` defines the property with the descriptor and `MakeChakraCoreBooleanValue` creates a js bool variable)
In JavaScript we have the following:
```
var comm = new Comment();
var isInstanceOf = comm instanceof Comment;
```
Which results to 'false'.
What is the correct way of creating and setting an object's constructor (it's prototype)?
|
Problem with a custom object and 'instanceof'.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5127/comments
| 6 |
2018-05-10T12:49:59Z
|
2018-05-14T21:13:55Z
|
https://github.com/chakra-core/ChakraCore/issues/5127
| 321,919,749 | 5,127 |
[
"chakra-core",
"ChakraCore"
] |
According to [ecma typeof operator](https://tc39.github.io/ecma262/#sec-typeof-operator) we are never supposed to swallow exceptions.
Instead we should check if the reference exists, if not return `"undefined"` otherwise let all other exceptions flow.
```js
var a = {
get x() {
throw new Error("Some error")
}
};
var p = new Proxy(a, {
get(obj, prop) {
if (prop === "x") return obj.x;
if (prop === "y") return obj.y;
throw new Error("Another Error");
}
})
try {console.log(typeof a.x);} catch (e) {console.log(e.message)}
try {console.log(typeof p.x);} catch (e) {console.log(e.message)}
try {console.log(typeof p.y);} catch (e) {console.log(e.message)}
try {console.log(typeof p.z);} catch (e) {console.log(e.message)}
// Excepted Output:
// Some error
// Some error
// undefined
// Another Error
// Actual Output:
// undefined
// undefined
// undefined
// undefined
```
|
typeof swallows too much exceptions
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5117/comments
| 3 |
2018-05-08T18:39:12Z
|
2019-06-07T18:45:01Z
|
https://github.com/chakra-core/ChakraCore/issues/5117
| 321,300,302 | 5,117 |
[
"chakra-core",
"ChakraCore"
] |
Evaluating
```js
(function(){"use strict";aa=233})()
```
in Edge causes a global variable `aa` to be created, instead of an error being thrown.
User agent:
```
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134
```
|
Functions evaluated in strict mode in console does not prevent implicit variables from being created in Edge
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5115/comments
| 24 |
2018-05-08T05:45:40Z
|
2019-06-07T19:04:05Z
|
https://github.com/chakra-core/ChakraCore/issues/5115
| 321,049,847 | 5,115 |
[
"chakra-core",
"ChakraCore"
] |
From the issues found in https://github.com/Microsoft/ChakraCore/pull/5099 `AllocationPolicy` seems fairly confusing to use. Especially when external allocations are involved.
- it is not very clear what `AllocationPolicy` applies to. - Is it process-wide, per script host or per-thread?
This need to be made more apparent.
- it is not easy to obtain `AllocationPolicy`. There are several patterns in use and applicable in deifferent situations. Perhaps there is a reason for the complexity here, but maybe there is a simpler way?
- ownership of `AllocationPolicy` is not very clear. We often retrieve it via recycler, but recycler itself does not own a policy. Should it be recycler, thread context, script context or should the policy be process-wide?
- it is especially confusing when we handle allocation of external memory via recycler, but it does not track that memory, so freeing still needs to be handled externally.
- also when external memory is involved, we also need to manipulate memory pressure. And it could be confusing. Perhaps adding/freeing external memory for the purpose of allocation policy should also handle adding/removing memory/GC pressure automatically.
- there are scenarios when we transfer the ownership of memory from one object to another and we handle that by temporarily "freeing" the allocation limit and then adding it back. That is fragile and redundant. We need helpers to "move" the allocation charge. (could be a noop in release)
|
AllocationPolicy should be made more straightforward to use
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5114/comments
| 1 |
2018-05-08T05:34:17Z
|
2019-06-07T18:26:47Z
|
https://github.com/chakra-core/ChakraCore/issues/5114
| 321,048,056 | 5,114 |
[
"chakra-core",
"ChakraCore"
] |
Chakra failed with error C4596 when build with permissive- by msvc on Windows, I use latest source on master branch. Could you please help take a look at this? this issue involved by commit https://github.com/Microsoft/ChakraCore/commit/ff4d7e93aea9b8d2d5c6d1ff020def2a0055ee16
We reported multi similar issues last year, some fixed some are still occurred.
The issue in https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/Core/ConfigParser.h#L43
https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/Core/ConfigParser.h#L44
You can repro this issue as the steps below:
1.git clone -c core.autocrlf=true https://github.com/microsoft/ChakraCore D:\Chakra\src
2.Open a clean x86 prompt (C:\windows\syswow64\cmd.exe) and browse to D:\Chakra\src
3.set CL=-wd4471 /permissive-
4.msbuild /m /p:Platform=x86 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.16299.0 Build\Chakra.Core.sln /t:Rebuild
Error info:
D:\Chakra\src\lib\Common\Core/ConfigParser.h(43): error C4596: 'SetConfigStringFromRegistry': illegal qualified name in member declaration
D:\Chakra\src\lib\Common\Core/ConfigParser.h(44): error C4596: 'ReadRegistryString': illegal qualified name in member declaration
|
Chakra failed with error C4596 when build with permissive- + MSVC on windows.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5112/comments
| 3 |
2018-05-08T02:13:18Z
|
2018-08-27T16:03:43Z
|
https://github.com/chakra-core/ChakraCore/issues/5112
| 321,018,696 | 5,112 |
[
"chakra-core",
"ChakraCore"
] |
Other browsers, like. Chrome, contains heuristics to reduce playback delay/latency when encountering fragmented MP4 files with unknown duration. This is typically encountered in live video streaming. Opening a such video will cause `"Video rendering in low delay mode."` to be displayed in the `chrome://media-internals/` page. Edge does not seem to support anything similar, and instead buffers extensively before starting playback.
Chrome implementation:
* Detection logic: https://cs.chromium.org/chromium/src/media/formats/mp4/mp4_stream_parser.cc?type=cs&l=616
* Usage: https://cs.chromium.org/chromium/src/media/renderers/video_renderer_impl.cc?type=cs&l=239
Steps to reproduce:
* Build & run https://github.com/forderud/AppWebStream with "8080" as argument. The FFMPEG-based back-end currently works best.
* Open `localhost:8080` in web browser.
* Observe video latency.
|
Low delay playback of fragmented MP4
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5107/comments
| 2 |
2018-05-07T09:14:17Z
|
2018-05-07T16:13:59Z
|
https://github.com/chakra-core/ChakraCore/issues/5107
| 320,731,784 | 5,107 |
[
"chakra-core",
"ChakraCore"
] |
(Originally reported through VS forum, told to report here instead.)
If I have the following JavaScript Vue.js code in a UWP app:
```
EventBus.$on("erase-history", (event) => {
await clearCacheAsync().then(() => console.log("Cleared Cache"), (e) => console.error(`Error Clearing Cache ${e}`));
});
```
Then I get an error message running my app:
JavaScript critical error at line 94, column 19 in ms-appx://js/mycode.js \n\nSCRIPT1004: Expected ';'
(that's the line with the await on it)
The real problem is I'm missing the 'async' keyword on the line before:
EventBus.$on("erase-history", async (event) => {
So my error message should be 'Expected async' to actually tell me what the real problem is. As otherwise, I look at semi-colons and I have nothing wrong.
|
Unhelpful Error Message - Should be missing 'async' keyword instead of Expected ';'
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5103/comments
| 8 |
2018-05-04T23:41:12Z
|
2024-04-16T18:44:13Z
|
https://github.com/chakra-core/ChakraCore/issues/5103
| 320,459,164 | 5,103 |
[
"chakra-core",
"ChakraCore"
] |
Noticed this while investigating nightly failures. Should be a simple fix.
|
Intl-ICU: "a".localeCompare(null) throws TypeError
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5097/comments
| 0 |
2018-05-04T16:51:45Z
|
2018-05-09T18:04:15Z
|
https://github.com/chakra-core/ChakraCore/issues/5097
| 320,347,260 | 5,097 |
[
"chakra-core",
"ChakraCore"
] |
Hi Team,
`https://github.com/Microsoft/ChakraCore/blob/master/pal/inc/pal.h#L4821`
Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120).
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused).
Request team to please have a look.
Cheers!
|
No checks for overflow's
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5092/comments
| 2 |
2018-05-03T17:16:28Z
|
2018-05-08T00:15:45Z
|
https://github.com/chakra-core/ChakraCore/issues/5092
| 320,007,982 | 5,092 |
[
"chakra-core",
"ChakraCore"
] |
Hi Team,
This issue was observed while analysis of source code :
`https://github.com/Microsoft/ChakraCore/blob/master/pal/src/thread/process.cpp#L743`
Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length.
Request to please have a look.
Cheers!
|
Static sized arrays may lead to overflows
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5090/comments
| 4 |
2018-05-03T15:56:06Z
|
2018-05-03T17:12:23Z
|
https://github.com/chakra-core/ChakraCore/issues/5090
| 319,980,982 | 5,090 |
[
"chakra-core",
"ChakraCore"
] |
I made a [sample page](https://turbographics2000.github.io/screencapture_test/) of Edge's Screen Capture API and tried it, but in my environment a MediaStreamError (abort) error occurs.
It is said that it worked in friends' environment when friends tried it.
How can I solve this problem?
https://youtu.be/2-1l7QfPkXo
|
Edge Screen Capture API. I got MediaStreamError(abortError)
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5089/comments
| 1 |
2018-05-03T04:41:31Z
|
2018-05-03T06:23:37Z
|
https://github.com/chakra-core/ChakraCore/issues/5089
| 319,786,522 | 5,089 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
according ES6 specification (https://github.com/tc39/ecma262/pull/833), the engine should throw a TypeError if ownKeys have duplicate entries.
OS = Ubuntu 17.10 x64
ChakraCore: 1.10.0.0-beta
Steps to reproduce:
var proxy = new Proxy({}, {
ownKeys: function (t) {
return ["A", "A"];
}
});
var keys = Object.keys(proxy);
Actual results:
Pass without failures
Expected results:
TypeError: proxy [[OwnPropertyKeys]] can't report property '"A"' more than once
Actually, only SpiderMonkey supports this specification. V8 have an open issue (https://bugs.chromium.org/p/v8/issues/detail?id=6776).
|
Chakra should throw TypeError if [[OwnPropertyKeys]] returns duplicate entries
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5087/comments
| 9 |
2018-05-02T22:18:36Z
|
2020-04-08T22:09:52Z
|
https://github.com/chakra-core/ChakraCore/issues/5087
| 319,731,541 | 5,087 |
[
"chakra-core",
"ChakraCore"
] |
As the title says. The following snippet should throw a `TypeError`, and it does so in most JS engines but not in Chakra/Edge.
```js
(() => { 'use strict'; (new Proxy({ }, { set() { } })).foo = 1; })();
```
I noticed this behavior in previous versions already, but could reproduce it in current `Microsoft Edge 42.17134.1.0` `Microsoft EdgeHTML 17.17134`.
|
No TypeError thrown in strict mode when Proxy set trap returns falsy
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5084/comments
| 4 |
2018-05-02T19:24:37Z
|
2018-07-17T19:16:35Z
|
https://github.com/chakra-core/ChakraCore/issues/5084
| 319,680,949 | 5,084 |
[
"chakra-core",
"ChakraCore"
] |
I'm trying to replicate implementation-specific behaviour in ChakraCore to mirror behaviour found in v8.
In v8, a Promise that `.reject()`s, wherein the rejection lacks a handler, will cause an exception.
ChakraCore has a `JsHostPromiseRejectionTrackerCallback` hook to define host behaviour in this situation.
The ChakraCore docs (https://github.com/Microsoft/ChakraCore/wiki/JsHostPromiseRejectionTrackerCallback) claim:
> Note - per ECMASpec #sec-host-promise-rejection-tracker this function should not set or return an exception.
The ECMAScript spec (https://www.ecma-international.org/ecma-262/7.0/#sec-host-promise-rejection-tracker) claims:
> An implementation of HostPromiseRejectionTracker must complete normally in all cases.
Given this constraint, I do not understand how I can throw an exception to the offending javascript code. V8 does it, so surely there must exist a reasonable method?
|
Raising an exception when promise rejection is unhandled
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5079/comments
| 2 |
2018-05-01T22:38:55Z
|
2018-05-31T19:49:21Z
|
https://github.com/chakra-core/ChakraCore/issues/5079
| 319,351,503 | 5,079 |
[
"chakra-core",
"ChakraCore"
] |
It looks like we don't handle global simd correctly.
It is unclear if global simd are allowed, but regardless we are missing explicit checks of the globals we support and this can lead to all sort of badness.
Either properly support global simd or make sure we have a compile error if the user tries to use global with the simd type
|
WASM: Global SIMD incorrectly handled
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5078/comments
| 5 |
2018-05-01T20:59:21Z
|
2018-08-10T00:37:10Z
|
https://github.com/chakra-core/ChakraCore/issues/5078
| 319,326,159 | 5,078 |
[
"chakra-core",
"ChakraCore"
] |
Hi,
there is an inconsistency when a variable is declared twice as "var" and "let" inside the "with" scope. Chakra should not accept the redeclaration and indicate an error.
OS: Ubuntu 17.10
Chakra: 1.10.0.0-beta
Step to reproduce:
```
with({}) {
var a;
let a;
}
```
Actual result:
Pass without failures
Expected result:
SyntaxError: Cannot declare a variable twice
V8 and SpiderMonkey raises an exception as expected.
|
Chakra should throw SyntaxError when a variable is already declared inside the "with" scope
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5076/comments
| 11 |
2018-05-01T02:53:34Z
|
2019-06-07T18:44:05Z
|
https://github.com/chakra-core/ChakraCore/issues/5076
| 319,101,133 | 5,076 |
[
"chakra-core",
"ChakraCore"
] |
The following should be an error and it is an error in v8 and sm
```js
if (true) {
let fo5_l = 123;
if (true) {
// conflict with `let` declaration in outer block scope - should fail.
try { eval("var fo5_l = 456") } catch (e) { print(e); }
}
}
```
We do handle this correctly when outer `let` is at the top scope, but not if it is in an intermediate block scope.
|
var declaration in eval should conflict with outer block-scoped let declaration
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5070/comments
| 1 |
2018-04-30T17:08:32Z
|
2019-06-07T18:44:00Z
|
https://github.com/chakra-core/ChakraCore/issues/5070
| 318,964,294 | 5,070 |
[
"chakra-core",
"ChakraCore"
] |
Is it possible to make a global object with a custom prototype?
If so, how?
|
Global object with a custom prototype
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5068/comments
| 5 |
2018-04-30T15:37:22Z
|
2018-05-31T19:49:05Z
|
https://github.com/chakra-core/ChakraCore/issues/5068
| 318,934,982 | 5,068 |
[
"chakra-core",
"ChakraCore"
] |
Hi,
there's an inconsistence when we try to access an property inside the "with" scope.
OS: Ubuntu 16.04 x64
Chakra: 1.10.0.0-beta
Step to reproduce:
```
var o = { f: "foo" };
with (o) {
var desc = Object.getOwnPropertyDescriptor(this, "f");
function f() {
return "bar";
}
if (!(desc.value === undefined)) {
throw new Error('expected: undefined, got: ' + desc.value);
}
}
```
Actual results:
Error: expected: undefined, got: function f() {
return "bar";
}
Expected results:
Pass without failures
V8 and Spidermonkey pass as expected, but Chakra and JavascriptCore returns the function f() inside "with" scope.
|
Inconsistency when try to access an property inside the "with" scope
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5067/comments
| 20 |
2018-04-30T12:13:01Z
|
2019-06-07T18:43:56Z
|
https://github.com/chakra-core/ChakraCore/issues/5067
| 318,869,474 | 5,067 |
[
"chakra-core",
"ChakraCore"
] |
Just installed Ubuntu 18.04 on a virtual machine and tried to build ChakraCore on it, got the following errors that caused the build to fail:
```
./build.sh -j=6 --embed-icu
```
```
/home/fatcerberus/src/ChakraCore/lib/Runtime/PlatformAgnostic/Platform/Common/UnicodeText.ICU.cpp:26:38: error: comparison of two values with different enumeration types ('PlatformAgnostic::UnicodeText::NormalizationForm' and 'UNormalization2Mode') [-Werror,-Wenum-compare]
NormalizationForm::C == UNORM2_COMPOSE &&
~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
/home/fatcerberus/src/ChakraCore/lib/Runtime/PlatformAgnostic/Platform/Common/UnicodeText.ICU.cpp:27:38: error: comparison of two values with different enumeration types ('PlatformAgnostic::UnicodeText::NormalizationForm' and 'UNormalization2Mode') [-Werror,-Wenum-compare]
NormalizationForm::D == UNORM2_DECOMPOSE &&
~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 errors generated.
lib/Runtime/PlatformAgnostic/Platform/CMakeFiles/Chakra.Runtime.PlatformAgnostic.dir/build.make:230: recipe for target 'lib/Runtime/PlatformAgnostic/Platform/CMakeFiles/Chakra.Runtime.PlatformAgnostic.dir/Common/UnicodeText.ICU.cpp.o' failed
make[2]: *** [lib/Runtime/PlatformAgnostic/Platform/CMakeFiles/Chakra.Runtime.PlatformAgnostic.dir/Common/UnicodeText.ICU.cpp.o] Error 1
CMakeFiles/Makefile2:1010: recipe for target 'lib/Runtime/PlatformAgnostic/Platform/CMakeFiles/Chakra.Runtime.PlatformAgnostic.dir/all' failed
make[1]: *** [lib/Runtime/PlatformAgnostic/Platform/CMakeFiles/Chakra.Runtime.PlatformAgnostic.dir/all] Error 2
```
Don't know if there are any more errors since these two caused the build to abort.
|
Clang6: Build fails on Ubuntu 18.04 LTS
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5066/comments
| 6 |
2018-04-30T04:56:45Z
|
2018-05-01T16:50:06Z
|
https://github.com/chakra-core/ChakraCore/issues/5066
| 318,785,885 | 5,066 |
[
"chakra-core",
"ChakraCore"
] |
Hi everyone,
when we try to get the prototype of an TypeError with Reflect.getPrototypeOf(TypeError) or Object.getPrototypeOf(TypeError) is expected that these functions should return the Error function.
OS: Ubuntu 16.04 x86
Chakra: 1.9
Step to reproduce:
```
var protoOfError = Reflect.getPrototypeOf(TypeError);
if (!(protoOfError === Error)){
throw new Error('expected: function Error() {[native code]}, got: ' + protoOfError);
}
```
Actual results:
expected: function Error() {[native code]}, got: function () {[native code]}
Expected results:
pass without failures
Same occurs with RangeError, EvalError, ReferenceError, SyntaxError and URIError.
V8, SpiderMonkey and JavascriptCore work as expected.
|
Reflect.getPrototypeOf(TypeError) should return the Error prototype
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5065/comments
| 9 |
2018-04-30T01:05:56Z
|
2018-09-11T15:49:39Z
|
https://github.com/chakra-core/ChakraCore/issues/5065
| 318,766,480 | 5,065 |
[
"chakra-core",
"ChakraCore"
] |
The macro `MAKE_MASK` uses a construct that clang 5.0.2 fails with `-werror`, which ChakraCore uses. The expansion on line 299, along with the error, reads:
```
/vagrant/ubuntu-build/chakracore-src/lib/Common/DataStructures/FixedBitVector.h:299:76: error: self-comparison always evaluates to true [-Werror,-Wtautological-compare]
const BVUnit::BVUnitTContainer mask = ( ((BVUnit::BitsPerWord) == BVUnit::BitsPerWord ? BVUnit::AllOnesMask : (((BVUnit::BVUnitTContainer)1 << ((BVUnit::BitsPerWord) - (oStart))) - 1)) << (oStart));
^
1 error generated.
```
If I add `-Wno-tautological-compare` to the list of warning suppressions in CMakeLists.txt, the build appears to work.
I'm happy to make a PR if this is an acceptable workaround.
|
Linux build fails in FixedBitVector due to -wtautological-compare
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5062/comments
| 4 |
2018-04-27T22:27:17Z
|
2018-05-01T17:21:13Z
|
https://github.com/chakra-core/ChakraCore/issues/5062
| 318,567,346 | 5,062 |
[
"chakra-core",
"ChakraCore"
] |
I'm seeing the same issue as #4320 again. Using the latest VS 15.7 preview, and referencing via the ChakraCore NuGet package in a C++ Console app, I get the below error (on the parameter `_In_ const uint16_t *content` in the declaration for `JsCreateStringUtf16`).
```
Severity Code Description Project File Line Suppression State
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ChakraConsole c:\temp\chakraconsole\packages\microsoft.chakracore.vc140.1.8.3\build\native\include\chakracore.h 285
```
The fix at #4322 seems to have been changed, and now the inclusion of `stdint.h` (which defines the type) is only present in the non-Windows section of ChakraCommon.h (i.e. its in the `else` block of the condition at https://github.com/Microsoft/ChakraCore/blob/707ae66637018f7983bc0ee5a6811c6e1789aa75/lib/Jsrt/ChakraCommon.h#L27 ).
|
uint16_t undefined with 1.8.3
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5059/comments
| 1 |
2018-04-27T20:33:51Z
|
2018-04-30T18:25:16Z
|
https://github.com/chakra-core/ChakraCore/issues/5059
| 318,541,282 | 5,059 |
[
"chakra-core",
"ChakraCore"
] |
## Environment
- WIndows 10 Enterprise / 1709 / 16299.371
- Microsoft Edge 41.16299.371.0 / Microsoft EdgeHTML 16.16299
- IE 11.371.16299.0 / 11.0.6(KB4092946)
## Symptom
Both MS Edge and IE11 have problem with `Date.prototype.toLocaleString()`.
"ζ" character is missing when `month` is specified as `short` and `year` is not specified.
#### OK when neither `month` nor `year` are specified.
```
new Date().toLocaleString('ja-JP');
// "β2018βεΉ΄β4βζβ26βζ₯β β11β:β37β:β33"
```
#### OK when `month` and `year` are specified.
```
new Date().toLocaleString('ja-JP', { day: 'numeric', month: 'short', year: 'numeric' });
// "β2018βεΉ΄β4βζβ26βζ₯"
new Date().toLocaleString('ja-JP', { month: 'short', year: 'numeric' });
// "β2018βεΉ΄β4βζ"
```
#### NG when `month` is specified but `year` is not specified.
```
new Date().toLocaleString('ja-JP', { day: 'numeric', month: 'short' });
// "β4β26βζ₯"
new Date().toLocaleString('ja-JP', { month: 'short' });
// "β4"
```
## Expected result
#### Should be OK no matter what `year` is specified or not.
```
new Date().toLocaleString('ja-JP', { day: 'numeric', month: 'short' });
// "β4ζβ26βζ₯"
new Date().toLocaleString('ja-JP', { month: 'short' });
// "β4ζ"
```
## Other modern browsers
There is no problem with other modern browsers.
- Chrome 65.0.3325.181
- Firefox 59.0.2
- Safari 11.1
```
new Date().toLocaleString('ja-JP');
// "2018/4/26 11:49:10"
new Date().toLocaleString('ja-JP', { day: 'numeric', month: 'short', year: 'numeric' });
// "2018εΉ΄4ζ26ζ₯"
new Date().toLocaleString('ja-JP', { month: 'short', year: 'numeric' });
// "2018εΉ΄4ζ"
new Date().toLocaleString('ja-JP', { day: 'numeric', month: 'short' });
// "4ζ26ζ₯"
new Date().toLocaleString('ja-JP', { month: 'short' });
// "4ζ"
```
|
Date.prototype.toLocaleString() - "ζ" character is missing when "month" is specified as "short" and "year" is not specified.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5048/comments
| 8 |
2018-04-26T03:12:20Z
|
2018-05-01T23:37:05Z
|
https://github.com/chakra-core/ChakraCore/issues/5048
| 317,862,307 | 5,048 |
[
"chakra-core",
"ChakraCore"
] |
There appears to be an error in strict mode detecting that a getter only property is read-only when that property is numerically indexed instead of having a name.
I would expect both of the below tests (1 and 2) to throw errors in strict mode, but with current CC master (and latests release) only the 2nd one does.
```js
"use strict";
const obj = { get "0" () { return 0; }, get bar () { return 0; }}
try { //test 1
obj[0] = 1;
print("expected error not thrown - attempted write to getter only obj[0]");
}
catch(e) {
print(e);
}
try { //test 2
obj.bar = 1;
print("expected error not thrown - attempted write to getter only obj.bar");
}
catch(e) {
print(e);
}
```
eshost output:
```
#### Chakra
expected error not thrown - attempted write to getter only obj[0]
TypeError: Assignment to read-only properties is not allowed in strict mode
#### V8 --harmony
TypeError: Cannot set property 0 of #<Object> which has only a getter
TypeError: Cannot set property bar of #<Object> which has only a getter
#### JavaScriptCore
TypeError: Attempted to assign to readonly property.
TypeError: Attempted to assign to readonly property.
#### SpiderMonkey
TypeError: setting getter-only property 0
TypeError: setting getter-only property "bar"
```
|
Bug:Strict mode write to indexed getter only prop should throw TypeError
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5046/comments
| 4 |
2018-04-25T22:45:28Z
|
2019-06-07T18:43:50Z
|
https://github.com/chakra-core/ChakraCore/issues/5046
| 317,819,533 | 5,046 |
[
"chakra-core",
"ChakraCore"
] |
Hi everyone,
I found this inconsistency when I try to use unary plus with invalid hexadecimal value.
OS: ubuntu 16.04 x86
chakra: 1.9
Steps to reproduce:
```
var a = +"\x00";
if (a===0) {
throw new Error("expected NaN but found 0");
}
```
Actual results:
Error: expected NaN but found 0
Expected results:
Pass without failures
According to documentation [Unary plus](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Unary_plus_()) `If it cannot parse a particular value, it will evaluate to NaN`. The others engines (V8, SpiderMonkey and JavascriptCore) pass without failures, but chakra recognize '\x00' as a null object.
cinfuzz
|
Unary plus with invalid hexadecimal value
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5038/comments
| 2 |
2018-04-25T04:05:12Z
|
2018-08-07T11:49:29Z
|
https://github.com/chakra-core/ChakraCore/issues/5038
| 317,472,025 | 5,038 |
[
"chakra-core",
"ChakraCore"
] |
I modified some code to be able to compile and execute ChaKraCore in AArch64 Linux.
Currently, I run the following simple code in interpreter mode, but occur argument passing error when calling into function test(num)
function test(num) {
return num;
}
var sum = 1;
for (var step = 0; step < 500000; step++) {
sum += test(step);
}
In this case, because of the parameter number is less than 6, thus just passing them by register in arm64_CallFunction()
// ARM64 calling convention is:
// x0 parameter 1 = function
// x1 parameter 2 = info
// x2 values[0]
// x3 values[1]
but entryPoint function as InterpreterStackFrame::InterpreterThunk(), use MACRO ARGUMENTS to get the arguments but expect the parameters are located in the stack.
// At entry of JavascriptMethod the stack layout is:
// [Return Address] [function] [callInfo] [arg0] [arg1] ...
Js::Var* va = _get_va(_AddressOfReturnAddress(), n);
my question is whether the parameters should be stored in the stack before enter the entrypoint?
|
Occur argument passing error in interpreter mode in AArch64 Linux
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5037/comments
| 2 |
2018-04-24T19:28:20Z
|
2018-05-31T19:48:55Z
|
https://github.com/chakra-core/ChakraCore/issues/5037
| 317,363,444 | 5,037 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.