mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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>
This commit is contained in:
1 parent
7253eaef58
commit
50235a03ef
1 file changed
+2
-4
+2
-4
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user