Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2016-08-21 13:31:20 +0300
committerBen Noordhuis <info@bnoordhuis.nl>2016-08-23 22:15:44 +0300
commitb4ea3a08f1507e4260f4fb1fa20a4195f5924091 (patch)
treebae27ee74c96f1b88597ed6e6cf1a1db91b1b66d /src/fs_event_wrap.cc
parenta129639eab186a5a0cb1384418938aef79a33220 (diff)
src: clean up PER_ISOLATE_STRING_PROPERTIES, v2
Remove strings from the PER_ISOLATE_STRING_PROPERTIES list that are only used once during initialization. It's less expensive to simply create them when needed than turn them into v8::Eternal instances. PR-URL: https://github.com/nodejs/node/pull/8207 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/fs_event_wrap.cc')
-rw-r--r--src/fs_event_wrap.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc
index 2354a1be0cd..64ff93e2576 100644
--- a/src/fs_event_wrap.cc
+++ b/src/fs_event_wrap.cc
@@ -65,14 +65,15 @@ void FSEventWrap::Initialize(Local<Object> target,
Local<Context> context) {
Environment* env = Environment::GetCurrent(context);
+ auto fsevent_string = FIXED_ONE_BYTE_STRING(env->isolate(), "FSEvent");
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
- t->SetClassName(env->fsevent_string());
+ t->SetClassName(fsevent_string);
env->SetProtoMethod(t, "start", Start);
env->SetProtoMethod(t, "close", Close);
- target->Set(env->fsevent_string(), t->GetFunction());
+ target->Set(fsevent_string, t->GetFunction());
}