This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta: merge node/master into node-chakracore/master
Merge d4b605b as of 2018-02-05 This commit was automatically generated. For any problems, please contact jackhorton Reviewed-By: Jimmy Thomson <[email protected]>
- Loading branch information
Showing
20 changed files
with
205 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2018 the V8 project authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// Flags: --allow-natives-syntax --expose-gc | ||
|
||
|
||
class Derived extends RegExp { | ||
constructor(a) { | ||
// Syntax Error | ||
const a = 1; | ||
} | ||
} | ||
|
||
let o = Reflect.construct(RegExp, [], Derived); | ||
%HeapObjectVerify(o); | ||
// Check that we can properly access lastIndex. | ||
assertEquals(o.lastIndex, 0); | ||
o.lastIndex = 1; | ||
assertEquals(o.lastIndex, 1); | ||
o.lastIndex = 0; | ||
gc(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use strict'; | ||
|
||
// exposes ModuleWrap for testing | ||
|
||
module.exports = internalBinding('module_wrap').ModuleWrap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
'use strict'; | ||
|
||
// Flags: --expose-internals | ||
|
||
const common = require('../common'); | ||
common.crashOnUnhandledRejection(); | ||
const assert = require('assert'); | ||
|
||
const ModuleWrap = require('internal/loader/ModuleWrap'); | ||
const { getPromiseDetails, isPromise } = process.binding('util'); | ||
const setTimeoutAsync = require('util').promisify(setTimeout); | ||
|
||
const foo = new ModuleWrap('export * from "bar"; 6;', 'foo'); | ||
const bar = new ModuleWrap('export const five = 5', 'bar'); | ||
|
||
(async () => { | ||
const promises = foo.link(() => setTimeoutAsync(1000).then(() => bar)); | ||
assert.strictEqual(promises.length, 1); | ||
assert(isPromise(promises[0])); | ||
|
||
await Promise.all(promises); | ||
|
||
assert.strictEqual(getPromiseDetails(promises[0])[1], bar); | ||
|
||
foo.instantiate(); | ||
|
||
assert.strictEqual(await foo.evaluate(), 6); | ||
assert.strictEqual(foo.namespace().five, 5); | ||
})(); |
Oops, something went wrong.