Skip to content

Commit

Permalink
src: avoid creating local data variable
Browse files Browse the repository at this point in the history
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: #14732
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
danbev authored and addaleax committed Aug 13, 2017
1 parent 82c63a5 commit 9237ef8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9237ef8

Please sign in to comment.