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

n-api: Fix test-addons-napi failures #249

Merged
merged 1 commit into from
May 18, 2017
Merged

Conversation

jasongin
Copy link
Member

@jasongin jasongin commented May 18, 2017

  • Reimplement napi_make_callback() to call node::MakeCallback() using V8 (chakrashim) types. We always knew the direct call to JsCallFunction() was incorrect there.
  • Re-enable the two tests that were failing due to napi_make_callback()

Fixes: #246

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

n-api

@jasongin jasongin requested a review from boingoing May 18, 2017 19:26
Copy link
Contributor

@boingoing boingoing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks right to me, nice work on the test cases

Copy link
Contributor

@digitalinfinity digitalinfinity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too, although I wonder if the test updates should just be PR-ed to nodejs/node instead? I'd like it if we kept the test differences between node and node-chakracore to a minimum

@jasongin
Copy link
Member Author

Oh, I need to update this PR to remove the skips that were put in for the failing tests.

I wonder if the test updates should just be PR-ed to nodejs/node instead?

I was thinking we would do that later. But instead we could just keep this test skipped until then.

 - Reimplement napi_make_callback to call node::MakeCallback using V8
   (chakrashim) types. We always knew the direct call to
   JsCallFunction() was incorrect there.
 - Re-enable the two tests that were failing due to napi_make_callback

Fixes: nodejs#246
@jasongin
Copy link
Member Author

I amended the PR to avoid changing the test JS file. I'll create a PR to node/master instead.

Also I removed the skips from the 2 tests that are now passing after the napi_make_callback() fix.

@kunalspathak
Copy link
Member

:shipit:

@jasongin jasongin merged commit ff42f9d into nodejs:xplat May 18, 2017
@jasongin jasongin deleted the napi_fixes branch May 18, 2017 23:08
kfarnung pushed a commit to kfarnung/node-chakracore that referenced this pull request May 23, 2017
- Reimplement napi_make_callback to call node::MakeCallback
   using V8 (chakrashim) types. We always knew the direct call to
   JsCallFunction() was incorrect there.
 - Re-enable the two tests that were failing due to napi_make_callback

Fixes: nodejs#246
chakrabot pushed a commit that referenced this pull request Feb 9, 2018
[1.8>1.9] [MERGE #4651 @dilijev] OS#14101048: Fixes #249: built-in functions should not have caller/arguments (and related fixes)

Merge pull request #4651 from dilijev:func-restricted-props

Replaces #4639

Several tests and test baselines needed to be updated to reflect the change in behavior. This change improves caller/arguments behavior without regressing any previous Chakra behavior. Chakra still differs from the spec and other engines on some aspects of caller/arguments.

See: https://tc39.github.io/ecma262/#sec-forbidden-extensions

Fixes #249
Fixes OS#14101048

---

Test262 results strictly improved.

Using test262 commit tc39/test262@03da228:

Previously 44130 passed, now 44138 passed out of 57102. (Duplicates below are strict and non-strict versions of the tests.)

```
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
```

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
chakrabot pushed a commit that referenced this pull request Feb 9, 2018
[1.9>master] [1.8>1.9] [MERGE #4651 @dilijev] OS#14101048: Fixes #249: built-in functions should not have caller/arguments (and related fixes)

Merge pull request #4651 from dilijev:func-restricted-props

Replaces #4639

Several tests and test baselines needed to be updated to reflect the change in behavior. This change improves caller/arguments behavior without regressing any previous Chakra behavior. Chakra still differs from the spec and other engines on some aspects of caller/arguments.

See: https://tc39.github.io/ecma262/#sec-forbidden-extensions

Fixes #249
Fixes OS#14101048

---

Test262 results strictly improved.

Using test262 commit tc39/test262@03da228:

Previously 44130 passed, now 44138 passed out of 57102. (Duplicates below are strict and non-strict versions of the tests.)

```
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
```

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
kfarnung pushed a commit to kfarnung/node-chakracore that referenced this pull request Feb 23, 2018
[1.8>1.9] [MERGE #4651 @dilijev] OS#14101048: Fixes nodejs#249: built-in functions should not have caller/arguments (and related fixes)

Merge pull request #4651 from dilijev:func-restricted-props

Replaces #4639

Several tests and test baselines needed to be updated to reflect the change in behavior. This change improves caller/arguments behavior without regressing any previous Chakra behavior. Chakra still differs from the spec and other engines on some aspects of caller/arguments.

See: https://tc39.github.io/ecma262/#sec-forbidden-extensions

Fixes nodejs#249
Fixes OS#14101048

---

Test262 results strictly improved.

Using test262 commit tc39/test262@03da228:

Previously 44130 passed, now 44138 passed out of 57102. (Duplicates below are strict and non-strict versions of the tests.)

```
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
```

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
kfarnung pushed a commit to kfarnung/node-chakracore that referenced this pull request Mar 6, 2018
[1.8>1.9] [MERGE #4651 @dilijev] OS#14101048: Fixes nodejs#249: built-in functions should not have caller/arguments (and related fixes)

Merge pull request #4651 from dilijev:func-restricted-props

Replaces #4639

Several tests and test baselines needed to be updated to reflect the change in behavior. This change improves caller/arguments behavior without regressing any previous Chakra behavior. Chakra still differs from the spec and other engines on some aspects of caller/arguments.

See: https://tc39.github.io/ecma262/#sec-forbidden-extensions

Fixes nodejs#249
Fixes OS#14101048

---

Test262 results strictly improved.

Using test262 commit tc39/test262@03da228:

Previously 44130 passed, now 44138 passed out of 57102. (Duplicates below are strict and non-strict versions of the tests.)

```
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
```

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
kfarnung pushed a commit to kfarnung/node-chakracore that referenced this pull request Mar 7, 2018
[1.8>1.9] [MERGE #4651 @dilijev] OS#14101048: Fixes nodejs#249: built-in functions should not have caller/arguments (and related fixes)

Merge pull request #4651 from dilijev:func-restricted-props

Replaces #4639

Several tests and test baselines needed to be updated to reflect the change in behavior. This change improves caller/arguments behavior without regressing any previous Chakra behavior. Chakra still differs from the spec and other engines on some aspects of caller/arguments.

See: https://tc39.github.io/ecma262/#sec-forbidden-extensions

Fixes nodejs#249
Fixes OS#14101048

---

Test262 results strictly improved.

Using test262 commit tc39/test262@03da228:

Previously 44130 passed, now 44138 passed out of 57102. (Duplicates below are strict and non-strict versions of the tests.)

```
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/Function/prototype/restricted-property-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-arguments.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
+PASS e:/dd/test262/test262/test/built-ins/ThrowTypeError/forbidden-caller.js
```

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants