Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index b95787fe16df3f97202c6d716c5e32c33cf6bd45..9c1830de4de59222e390e27ce473dd4ace5f6ddf 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -9840,7 +9840,7 @@ Handle<JSObject> Script::GetWrapper(Handle<Script> script) { |
Isolate* isolate = script->GetIsolate(); |
if (!script->wrapper()->IsUndefined()) { |
Handle<WeakCell> cell(WeakCell::cast(script->wrapper())); |
- if (!cell->value()->IsUndefined()) { |
+ if (!cell->cleared()) { |
// Return a handle for the existing script wrapper from the cache. |
return handle(JSObject::cast(cell->value())); |
} |