| Index: src/handles-inl.h
|
| diff --git a/src/handles-inl.h b/src/handles-inl.h
|
| index 6e7c3d972434f16fb7ce410824e22112f1f8649e..cfe34f1230a899497bd622670300dc51e4541964 100644
|
| --- a/src/handles-inl.h
|
| +++ b/src/handles-inl.h
|
| @@ -37,15 +37,18 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -template<class T>
|
| -Handle<T>::Handle(T* obj) {
|
| - ASSERT(!obj->IsFailure());
|
| - location_ = HandleScope::CreateHandle(obj, Isolate::Current());
|
| +inline Isolate* GetIsolateForHandle(Object* obj) {
|
| + return Isolate::Current();
|
| +}
|
| +
|
| +inline Isolate* GetIsolateForHandle(HeapObject* obj) {
|
| + return obj->GetIsolate();
|
| }
|
|
|
| template<class T>
|
| -Handle<T>::Handle(HeapObject* obj) {
|
| - location_ = HandleScope::CreateHandle<T>(obj, obj->GetIsolate());
|
| +Handle<T>::Handle(T* obj) {
|
| + ASSERT(!obj->IsFailure());
|
| + location_ = HandleScope::CreateHandle(obj, GetIsolateForHandle(obj));
|
| }
|
|
|
|
|
|
|