⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 203315 in webkit


Ignore:
Timestamp:
Jul 15, 2016, 6:14:57 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

Assertion failures and crashes with missing TDZ checks for catch-node bindings.
https://bugs.webkit.org/show_bug.cgi?id=158797

Reviewed by Saam Barati.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitPushCatchScope):
(JSC::BytecodeGenerator::emitPopCatchScope):

  • tests/stress/catch-clause-should-be-under-tdz1.js: Added.
  • tests/stress/catch-clause-should-be-under-tdz2.js: Added.
  • tests/stress/catch-clause-should-be-under-tdz3.js: Added.
  • tests/stress/catch-clause-should-be-under-tdz4.js: Added.
  • tests/stress/catch-clause-should-be-under-tdz5.js: Added.
Location:
trunk/Source/JavaScriptCore
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r203303 r203315  
     12016-07-15  Mark Lam  <mark.lam@apple.com>
     2
     3        Assertion failures and crashes with missing TDZ checks for catch-node bindings.
     4        https://bugs.webkit.org/show_bug.cgi?id=158797
     5
     6        Reviewed by Saam Barati.
     7
     8        * bytecompiler/BytecodeGenerator.cpp:
     9        (JSC::BytecodeGenerator::emitPushCatchScope):
     10        (JSC::BytecodeGenerator::emitPopCatchScope):
     11        * tests/stress/catch-clause-should-be-under-tdz1.js: Added.
     12        * tests/stress/catch-clause-should-be-under-tdz2.js: Added.
     13        * tests/stress/catch-clause-should-be-under-tdz3.js: Added.
     14        * tests/stress/catch-clause-should-be-under-tdz4.js: Added.
     15        * tests/stress/catch-clause-should-be-under-tdz5.js: Added.
     16
    1172016-07-15  Geoffrey Garen  <ggaren@apple.com>
    218
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r203006 r203315  
    38633863void BytecodeGenerator::emitPushCatchScope(VariableEnvironment& environment)
    38643864{
    3865     pushLexicalScopeInternal(environment, TDZCheckOptimization::Optimize, NestedScopeType::IsNotNested, nullptr, TDZRequirement::NotUnderTDZ, ScopeType::CatchScope, ScopeRegisterType::Block);
     3865    pushLexicalScopeInternal(environment, TDZCheckOptimization::Optimize, NestedScopeType::IsNotNested, nullptr, TDZRequirement::UnderTDZ, ScopeType::CatchScope, ScopeRegisterType::Block);
    38663866}
    38673867
Note: See TracChangeset for help on using the changeset viewer.