Browse Source

src: avoid creating local data variable

This commit removes the following comment and attempts to fix the issue
as the the requirement of g++ version is now 4.9.4 or newer:

// XXX(bnoordhuis) Work around a g++ 4.9.2 template type inferrer bug
// when the expression is written as info.Data().As<v8::External>().

PR-URL: https://github.com/nodejs/node/pull/14732
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
v6
Daniel Bevenius 7 years ago
parent
commit
50235a03ef
  1. 6
      src/env-inl.h

6
src/env-inl.h

@ -283,10 +283,8 @@ template <typename T>
inline Environment* Environment::GetCurrent(
const v8::PropertyCallbackInfo<T>& info) {
CHECK(info.Data()->IsExternal());
// XXX(bnoordhuis) Work around a g++ 4.9.2 template type inferrer bug
// when the expression is written as info.Data().As<v8::External>().
v8::Local<v8::Value> data = info.Data();
return static_cast<Environment*>(data.As<v8::External>()->Value());
return static_cast<Environment*>(
info.Data().template As<v8::External>()->Value());
}
inline Environment::Environment(IsolateData* isolate_data,

Loading…
Cancel
Save