[turbofan] Guard call to ProcessReceiverMapForApiCall
Subsequently LookupHolderOfExpectedType should be called only when we have installed handler code. Bug: chromium:1024936, v8:7790 Change-Id: I33a0a7232afaba8455a0cec1fdc56251947419d6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1930905 Commit-Queue: Maya Lekova <mslekova@chromium.org> Auto-Submit: Maya Lekova <mslekova@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#65148}
This commit is contained in:
parent
84b3532463
commit
3d0f645f2d
@ -2212,7 +2212,7 @@ void SerializerForBackgroundCompilation::ProcessReceiverMapForApiCall(
|
||||
FunctionTemplateInfoRef target, Handle<Map> receiver) {
|
||||
if (!receiver->is_access_check_needed()) {
|
||||
MapRef receiver_map(broker(), receiver);
|
||||
TRACE_BROKER(broker(), "Serializing holder for target:" << target);
|
||||
TRACE_BROKER(broker(), "Serializing holder for target: " << target);
|
||||
target.LookupHolderOfExpectedType(receiver_map,
|
||||
SerializationPolicy::kSerializeIfNeeded);
|
||||
}
|
||||
@ -2896,8 +2896,10 @@ SerializerForBackgroundCompilation::ProcessMapForNamedPropertyAccess(
|
||||
if (sfi->IsApiFunction()) {
|
||||
FunctionTemplateInfoRef fti_ref(
|
||||
broker(), handle(sfi->get_api_func_data(), broker()->isolate()));
|
||||
if (fti_ref.has_call_code()) fti_ref.SerializeCallCode();
|
||||
ProcessReceiverMapForApiCall(fti_ref, receiver_map.object());
|
||||
if (fti_ref.has_call_code()) {
|
||||
fti_ref.SerializeCallCode();
|
||||
ProcessReceiverMapForApiCall(fti_ref, receiver_map.object());
|
||||
}
|
||||
}
|
||||
} else if (access_info.constant()->IsJSBoundFunction()) {
|
||||
JSBoundFunctionRef function(broker(), access_info.constant());
|
||||
|
17
test/mjsunit/compiler/regress-1024936.js
Normal file
17
test/mjsunit/compiler/regress-1024936.js
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright 2019 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --allow-natives-syntax
|
||||
|
||||
Object.defineProperty(Number.prototype, "v", { get: constructor });
|
||||
function get_v(num) {
|
||||
return num.v;
|
||||
}
|
||||
|
||||
let n = new Number(42);
|
||||
%PrepareFunctionForOptimization(get_v);
|
||||
get_v(n);
|
||||
get_v(n);
|
||||
%OptimizeFunctionOnNextCall(get_v);
|
||||
get_v(n);
|
Loading…
Reference in New Issue
Block a user