Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix warning in node_messaging #26682

Closed
wants to merge 1 commit into from

Conversation

ZYSzys
Copy link
Member

@ZYSzys ZYSzys commented Mar 15, 2019

Got some warning when building Node.js from newest master.

So fixed by:

  • Use WasmModuleObject instead of WasmCompiledModule.
  • Use IsDetachable() instead of IsNeuterable.
  • Use Detach() instead of Neuter.
In file included from /Users/zyszys/Projects/node/out/Release/obj/gen/node_javascript.cc:3:
In file included from ../src/node_internals.h:27:
In file included from ../src/env-inl.h:35:
In file included from ../src/node_worker.h:7:
../src/node_messaging.h:52:48: warning: 'WasmCompiledModule' is deprecated: Use WasmModuleObject [-Wdeprecated-declarations]
  uint32_t AddWASMModule(v8::WasmCompiledModule::TransferrableModule&& mod);
                                               ^
../deps/v8/include/v8.h:4444:1: note: 'WasmCompiledModule' has been explicitly marked deprecated here
V8_DEPRECATED("Use WasmModuleObject",
^
../deps/v8/include/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from /Users/zyszys/Projects/node/out/Release/obj/gen/node_javascript.cc:3:
In file included from ../src/node_internals.h:27:
In file included from ../src/env-inl.h:35:
In file included from ../src/node_worker.h:7:
../src/node_messaging.h:71:37: warning: 'WasmCompiledModule' is deprecated: Use WasmModuleObject [-Wdeprecated-declarations]
  std::vector<v8::WasmCompiledModule::TransferrableModule> wasm_modules_;
                                    ^
../deps/v8/include/v8.h:4444:1: note: 'WasmCompiledModule' has been explicitly marked deprecated here
V8_DEPRECATED("Use WasmModuleObject",
^
../deps/v8/include/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
2 warnings generated.
../src/node_messaging.cc:73:14: warning: 'WasmCompiledModule' is deprecated: Use
      WasmModuleObject [-Wdeprecated-declarations]
  MaybeLocal<WasmCompiledModule> GetWasmModuleFromId(
             ^
../deps/v8/include/v8.h:4444:1: note: 'WasmCompiledModule' has been explicitly marked
      deprecated here
V8_DEPRECATED("Use WasmModuleObject",
^
../deps/v8/include/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/node_messaging.cc:238:31: warning: 'WasmCompiledModule' is deprecated: Use
      WasmModuleObject [-Wdeprecated-declarations]
      Isolate* isolate, Local<WasmCompiledModule> module) override {
                              ^
../deps/v8/include/v8.h:4444:1: note: 'WasmCompiledModule' has been explicitly marked
      deprecated here
V8_DEPRECATED("Use WasmModuleObject",
^
../deps/v8/include/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/node_messaging.cc:305:18: warning: 'IsNeuterable' is deprecated: Use
      IsDetachable() instead. [-Wdeprecated-declarations]
        if (!ab->IsNeuterable() || ab->IsExternal() ||
                 ^
../deps/v8/include/v8.h:4723:3: note: 'IsNeuterable' has been explicitly marked
      deprecated here
  V8_DEPRECATE_SOON("Use IsDetachable() instead.",
  ^
../deps/v8/include/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/node_messaging.cc:371:9: warning: 'Neuter' is deprecated: Use Detach() instead.
      [-Wdeprecated-declarations]
    ab->Neuter();
        ^
../deps/v8/include/v8.h:4737:3: note: 'Neuter' has been explicitly marked deprecated
      here
  V8_DEPRECATE_SOON("Use Detach() instead.", inline void Neuter()) { Detach(); }
  ^
../deps/v8/include/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Mar 15, 2019
@addaleax
Copy link
Member

addaleax commented Mar 15, 2019

I’d be okay with fast-tracking this. (:+1: this comment if you agree.)

@addaleax
Copy link
Member

@addaleax addaleax added the fast-track PRs that do not need to wait for 48 hours to land. label Mar 15, 2019
Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@addaleax
Copy link
Member

Landed in 0752a18

@addaleax addaleax closed this Mar 15, 2019
addaleax pushed a commit that referenced this pull request Mar 15, 2019
PR-URL: #26682
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@ZYSzys ZYSzys deleted the src-node-messaging branch March 15, 2019 15:04
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++. fast-track PRs that do not need to wait for 48 hours to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants