Skip to content

src: emit warnings from V8#24365

Merged
devsnek merged 1 commit into
nodejs:masterfrom
devsnek:feature/v8-warnings
Nov 16, 2018
Merged

src: emit warnings from V8#24365
devsnek merged 1 commit into
nodejs:masterfrom
devsnek:feature/v8-warnings

Conversation

@devsnek

@devsnek devsnek commented Nov 14, 2018

Copy link
Copy Markdown
Member

Currently the only place V8 does this is asm.js compilation:

function AsmModule() {
  'use asm';

  function add(a, b) {
    a = a | 0;
    b = b | 0;

    // should be `return (a + b) | 0;`
    return a + b; // (node:18940) V8: test.js:9 Invalid asm.js: Invalid return type
  }

  return { add: add };
}

In chromium:

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

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 14, 2018
@devsnek devsnek added the v8 engine Issues and PRs related to the V8 dependency. label Nov 14, 2018
@devsnek devsnek requested review from addaleax and hashseed November 14, 2018 15:11
@targos

targos commented Nov 14, 2018

Copy link
Copy Markdown
Member

Is it testable? Maybe with a message test?

@addaleax addaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would you mind adding the test case from the PR description as a test here?

Comment thread src/node.cc Outdated
@devsnek devsnek force-pushed the feature/v8-warnings branch from 2375408 to 94e10db Compare November 14, 2018 15:28
@devsnek

devsnek commented Nov 14, 2018

Copy link
Copy Markdown
Member Author

@targos @addaleax tests added 👍

@devsnek

devsnek commented Nov 14, 2018

Copy link
Copy Markdown
Member Author

@refack refack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread src/node.cc Outdated
Comment thread src/node.cc Outdated
@refack refack added the wasm Issues and PRs related to WebAssembly. label Nov 14, 2018
@devsnek devsnek removed the wasm Issues and PRs related to WebAssembly. label Nov 14, 2018
@refack

refack commented Nov 14, 2018

Copy link
Copy Markdown
Contributor

refack added the wasm label

I know it's not wasm but it's the most relevant label.

@devsnek devsnek added the asm.js label Nov 14, 2018

@joyeecheung joyeecheung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would probably be even better if ProcessEmitWarningGeneric is less generic on the C++ side and we can just do the overload in JS...but anyway LGTM

(off-topic: we have a wasm label? AND a asm.js label? and they are both green?)

Comment thread src/node.cc Outdated
@refack

refack commented Nov 14, 2018

Copy link
Copy Markdown
Contributor

a wasm label? AND a asm.js label? and they are both green

The asm.js is brand new. And like their subjects, if you look from a distance they look the same ;)

@devsnek devsnek force-pushed the feature/v8-warnings branch from 94e10db to 6a17bd4 Compare November 14, 2018 18:40
Comment thread src/node.cc Outdated
Comment thread src/node.cc Outdated
Comment thread src/node.cc Outdated
Comment thread src/node.cc Outdated
@devsnek devsnek force-pushed the feature/v8-warnings branch from 6a17bd4 to fc4ec7a Compare November 14, 2018 20:05
@devsnek

devsnek commented Nov 14, 2018

Copy link
Copy Markdown
Member Author

CI https://ci.nodejs.org/job/node-test-pull-request/18619/

PR-URL: nodejs#24365
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@devsnek devsnek force-pushed the feature/v8-warnings branch from fc4ec7a to e1aa730 Compare November 16, 2018 15:18
@devsnek devsnek merged commit e1aa730 into nodejs:master Nov 16, 2018
@devsnek devsnek deleted the feature/v8-warnings branch November 16, 2018 15:19
targos pushed a commit that referenced this pull request Nov 18, 2018
PR-URL: #24365
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
rvagg pushed a commit that referenced this pull request Nov 28, 2018
PR-URL: #24365
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@BridgeAR BridgeAR mentioned this pull request Dec 5, 2018
4 tasks
@codebytere

codebytere commented Jan 12, 2019

Copy link
Copy Markdown
Member

@devsnek do you think that this can/should be backported to v10.x? I added the label but feel free to remove!

nodejs-github-bot pushed a commit that referenced this pull request May 25, 2026
asm.js validation is deprecated and disabled by default in V8,
so there's no longer a stable user-reachable trigger for
`v8::Isolate::kMessageWarning`. Remove the test.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7832184

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #63469
Fixes: nodejs/node-v8#310
Refs: https://issues.chromium.org/issues/510487707
Refs: #24365
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7832184
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
aduh95 pushed a commit that referenced this pull request May 27, 2026
asm.js validation is deprecated and disabled by default in V8,
so there's no longer a stable user-reachable trigger for
`v8::Isolate::kMessageWarning`. Remove the test.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7832184

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #63469
Fixes: nodejs/node-v8#310
Refs: https://issues.chromium.org/issues/510487707
Refs: #24365
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7832184
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants