if (lookup->holder() != *global) return;
JSGlobalPropertyCell* cell =
JSGlobalPropertyCell::cast(global->GetPropertyCell(lookup));
- if (cell->value()->IsJSFunction()) {
- JSFunction* function = JSFunction::cast(cell->value());
- code = StubCache::ComputeCallGlobal(argc, in_loop, *name, *global,
- cell, function);
- }
+ if (!cell->value()->IsJSFunction()) return;
+ JSFunction* function = JSFunction::cast(cell->value());
+ code = StubCache::ComputeCallGlobal(argc, in_loop, *name, *global,
+ cell, function);
} else {
// There is only one shared stub for calling normalized
// properties. It does not traverse the prototype chain, so the
// If we're unable to compute the stub (not enough memory left), we
// simply avoid updating the caches.
- if (code->IsFailure()) return;
+ if (code == NULL || code->IsFailure()) return;
// Patch the call site depending on the state of the cache.
if (state == UNINITIALIZED ||
// If we're unable to compute the stub (not enough memory left), we
// simply avoid updating the caches.
- if (code->IsFailure()) return;
+ if (code == NULL || code->IsFailure()) return;
// Patch the call site depending on the state of the cache.
if (state == UNINITIALIZED || state == PREMONOMORPHIC ||
// If we're unable to compute the stub (not enough memory left), we
// simply avoid updating the caches.
- if (code->IsFailure()) return;
+ if (code == NULL || code->IsFailure()) return;
// Patch the call site depending on the state of the cache. Make
// sure to always rewrite from monomorphic to megamorphic.
// If we're unable to compute the stub (not enough memory left), we
// simply avoid updating the caches.
- if (code->IsFailure()) return;
+ if (code == NULL || code->IsFailure()) return;
// Patch the call site depending on the state of the cache.
if (state == UNINITIALIZED || state == MONOMORPHIC_PROTOTYPE_FAILURE) {
// If we're unable to compute the stub (not enough memory left), we
// simply avoid updating the caches.
- if (code->IsFailure()) return;
+ if (code == NULL || code->IsFailure()) return;
// Patch the call site depending on the state of the cache. Make
// sure to always rewrite from monomorphic to megamorphic.