Commit 7f4d766c authored by titzer's avatar titzer Committed by Commit bot

Fix check for wasm_function_map during bootstrapping.

R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1579573003

Cr-Commit-Position: refs/heads/master@{#33229}
parent 1e51af1a
......@@ -1221,14 +1221,15 @@ Handle<JSFunction> Factory::NewFunction(Handle<Map> map,
Handle<SharedFunctionInfo> info =
NewSharedFunctionInfo(name, code, map->is_constructor());
DCHECK(is_sloppy(info->language_mode()));
DCHECK(!map->IsUndefined());
DCHECK(
map.is_identical_to(isolate()->sloppy_function_map()) ||
map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) ||
map.is_identical_to(
isolate()->sloppy_function_with_readonly_prototype_map()) ||
map.is_identical_to(isolate()->strict_function_map()) ||
(FLAG_expose_wasm &&
map.is_identical_to(isolate()->wasm_function_map())) ||
// TODO(titzer): wasm_function_map() could be undefined here. ugly.
(*map == context->get(Context::WASM_FUNCTION_MAP_INDEX)) ||
map.is_identical_to(isolate()->proxy_function_map()));
return NewFunction(map, info, context);
}
......
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