[sparkplug] Fix IsCompiledScope
IsCompiledScope should check for BaselineData before BytecodeArray, since the former implies the latter. Bug: v8:11420 Change-Id: I6c659a5f97180b478fb3401f55a095b6d307b80f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3054117 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Mythri Alle <mythria@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Cr-Commit-Position: refs/heads/master@{#75924}
This commit is contained in:
parent
5f8cd123f0
commit
4440d7a5be
@ -467,10 +467,10 @@ IsCompiledScope SharedFunctionInfo::is_compiled_scope(IsolateT* isolate) const {
|
||||
IsCompiledScope::IsCompiledScope(const SharedFunctionInfo shared,
|
||||
Isolate* isolate)
|
||||
: is_compiled_(shared.is_compiled()) {
|
||||
if (shared.HasBytecodeArray()) {
|
||||
retain_code_ = handle(shared.GetBytecodeArray(isolate), isolate);
|
||||
} else if (shared.HasBaselineData()) {
|
||||
if (shared.HasBaselineData()) {
|
||||
retain_code_ = handle(shared.baseline_data(), isolate);
|
||||
} else if (shared.HasBytecodeArray()) {
|
||||
retain_code_ = handle(shared.GetBytecodeArray(isolate), isolate);
|
||||
} else {
|
||||
retain_code_ = MaybeHandle<HeapObject>();
|
||||
}
|
||||
@ -481,11 +481,11 @@ IsCompiledScope::IsCompiledScope(const SharedFunctionInfo shared,
|
||||
IsCompiledScope::IsCompiledScope(const SharedFunctionInfo shared,
|
||||
LocalIsolate* isolate)
|
||||
: is_compiled_(shared.is_compiled()) {
|
||||
if (shared.HasBytecodeArray()) {
|
||||
if (shared.HasBaselineData()) {
|
||||
retain_code_ = isolate->heap()->NewPersistentHandle(shared.baseline_data());
|
||||
} else if (shared.HasBytecodeArray()) {
|
||||
retain_code_ =
|
||||
isolate->heap()->NewPersistentHandle(shared.GetBytecodeArray(isolate));
|
||||
} else if (shared.HasBaselineData()) {
|
||||
retain_code_ = isolate->heap()->NewPersistentHandle(shared.baseline_data());
|
||||
} else {
|
||||
retain_code_ = MaybeHandle<HeapObject>();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user