Index: src/liveedit.h |
diff --git a/src/liveedit.h b/src/liveedit.h |
index 5be63ac0a12618039fc1b2a68544a78481c064d8..e06688a9efae957b4c12ec96436a77f747728f4e 100644 |
--- a/src/liveedit.h |
+++ b/src/liveedit.h |
@@ -278,9 +278,13 @@ class FunctionInfoWrapper : public JSArrayBasedStruct<FunctionInfoWrapper> { |
class SharedInfoWrapper : public JSArrayBasedStruct<SharedInfoWrapper> { |
public: |
static bool IsInstance(Handle<JSArray> array) { |
- return array->length() == Smi::FromInt(kSize_) && |
- Object::GetElement(array->GetIsolate(), array, kSharedInfoOffset_) |
- .ToHandleChecked()->IsJSValue(); |
+ if (array->length() != Smi::FromInt(kSize_)) return false; |
+ Handle<Object> element( |
+ Object::GetElement(array->GetIsolate(), |
+ array, |
+ kSharedInfoOffset_).ToHandleChecked()); |
+ if (!element->IsJSValue()) return false; |
+ return Handle<JSValue>::cast(element)->value()->IsSharedFunctionInfo(); |
} |
explicit SharedInfoWrapper(Handle<JSArray> array) |