Skip to content

Commit cc07f74

Browse files
committed
JIT::emit_op_iterator_next fast path passes in the wrong identifier to the "done" JITGetByIdGenerator
https://bugs.webkit.org/show_bug.cgi?id=219499 Reviewed by Keith Miller. The reason nothing was failing here is that the slow path which calls into C code to do repatching of the IC was using the right "done" identifier. The fast path only checks if the identifier is "length", so the code sidestepped itself being wrong in any way. However, it's good form to use the correct identifier. * jit/JITCall.cpp: (JSC::JIT::emit_op_iterator_next): Canonical link: https://commits.webkit.org/232087@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent ee6d99c commit cc07f74

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

Source/JavaScriptCore/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2020-12-03 Saam Barati <sbarati@apple.com>
2+
3+
JIT::emit_op_iterator_next fast path passes in the wrong identifier to the "done" JITGetByIdGenerator
4+
https://bugs.webkit.org/show_bug.cgi?id=219499
5+
6+
Reviewed by Keith Miller.
7+
8+
The reason nothing was failing here is that the slow path which calls into C
9+
code to do repatching of the IC was using the right "done" identifier. The
10+
fast path only checks if the identifier is "length", so the code sidestepped
11+
itself being wrong in any way. However, it's good form to use the correct
12+
identifier.
13+
14+
* jit/JITCall.cpp:
15+
(JSC::JIT::emit_op_iterator_next):
16+
117
2020-12-03 Lauro Moura <lmoura@igalia.com>
218

319
[WTF] Avoid JSONValue::create with raw string falling to bool overload

Source/JavaScriptCore/jit/JITCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ void JIT::emit_op_iterator_next(const Instruction* instruction)
482482
preservedRegs.add(valueGPR);
483483
JITGetByIdGenerator gen(
484484
m_codeBlock, CodeOrigin(m_bytecodeIndex), CallSiteIndex(BytecodeIndex(m_bytecodeIndex.offset())), preservedRegs,
485-
CacheableIdentifier::createFromImmortalIdentifier(vm().propertyNames->next.impl()), JSValueRegs(iterResultGPR), JSValueRegs(doneGPR), AccessType::GetById);
485+
CacheableIdentifier::createFromImmortalIdentifier(vm().propertyNames->done.impl()), JSValueRegs(iterResultGPR), JSValueRegs(doneGPR), AccessType::GetById);
486486
gen.generateFastPath(*this);
487487
addSlowCase(gen.slowPathJump());
488488
m_getByIds.append(gen);

0 commit comments

Comments
 (0)