mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
`kNormal` has been the implicit default for a while now (since V8 7.6). Refs: https://github.com/v8/v8/commit/e0d7f816990ada28ebe1281ca9431236ef8c6e4f PR-URL: https://github.com/nodejs/node/pull/34248 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
15 lines
405 B
C++
15 lines
405 B
C++
#include <node.h>
|
|
#include <v8.h>
|
|
|
|
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
|
v8::Isolate* isolate = args.GetIsolate();
|
|
args.GetReturnValue().Set(v8::String::NewFromUtf8(
|
|
isolate, "world").ToLocalChecked());
|
|
}
|
|
|
|
void init(v8::Local<v8::Object> exports, v8::Local<v8::Object> module) {
|
|
NODE_SET_METHOD(module, "exports", Method);
|
|
}
|
|
|
|
NODE_MODULE(NODE_GYP_MODULE_NAME, init)
|