Skip to content

Commit 9237ef8

Browse files
danbevaddaleax
authored andcommitted
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: #14732 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 82c63a5 commit 9237ef8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/env-inl.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,8 @@ template <typename T>
283283
inline Environment* Environment::GetCurrent(
284284
const v8::PropertyCallbackInfo<T>& info) {
285285
CHECK(info.Data()->IsExternal());
286-
// XXX(bnoordhuis) Work around a g++ 4.9.2 template type inferrer bug
287-
// when the expression is written as info.Data().As<v8::External>().
288-
v8::Local<v8::Value> data = info.Data();
289-
return static_cast<Environment*>(data.As<v8::External>()->Value());
286+
return static_cast<Environment*>(
287+
info.Data().template As<v8::External>()->Value());
290288
}
291289

292290
inline Environment::Environment(IsolateData* isolate_data,

0 commit comments

Comments
 (0)