Commit 1e34cead authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Relax assumptions of InitialMapDependency.

Chrome-crash tells me that occasionally a function gets stripped of an
initial map entirely (e.g. report 917de3c31d0e0d9b).

R=jarin@chromium.org

Change-Id: Ie0103695c4801a4c2cbc488af91c3d580efe4eab
Reviewed-on: https://chromium-review.googlesource.com/1143483Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54568}
parent 85cf39d4
......@@ -23,7 +23,7 @@ class CompilationDependencies::Dependency : public ZoneObject {
class InitialMapDependency final : public CompilationDependencies::Dependency {
public:
InitialMapDependency(JSFunctionRef function, MapRef initial_map)
InitialMapDependency(const JSFunctionRef& function, const MapRef& initial_map)
: function_(function), initial_map_(initial_map) {
DCHECK(IsSane());
}
......@@ -36,8 +36,8 @@ class InitialMapDependency final : public CompilationDependencies::Dependency {
bool IsValid() const override {
Handle<JSFunction> function = function_.object<JSFunction>();
CHECK(function->has_initial_map());
return function->initial_map() == *initial_map_.object<Map>();
return function->has_initial_map() &&
function->initial_map() == *initial_map_.object<Map>();
}
void Install(Isolate* isolate, Handle<WeakCell> code) override {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment