Ignore:
Timestamp:
Mar 5, 2012, 5:18:42 PM (13 years ago)
Author:
[email protected]
Message:

putByIndex should throw in strict mode
https://bugs.webkit.org/show_bug.cgi?id=80335

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

We'll need to pass an additional parameter.

Part 1 - rename JSValue::put() for integer indices to JSValue::putByIndex()
to match the method in the MethodTable, make this take a parameter indicating
whether the put should throw. This fixes the cases where the base of the put
is a primitive.

  • dfg/DFGOperations.cpp:

(DFG):
(JSC::DFG::putByVal):
(JSC::DFG::operationPutByValInternal):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):
(JSC::Interpreter::privateExecute):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/JSObject.h:

(JSC::JSValue::putByIndex):

  • runtime/JSValue.cpp:

(JSC):

  • runtime/JSValue.h:

(JSValue):

LayoutTests:

  • fast/js/primitive-property-access-edge-cases-expected.txt:
  • fast/js/script-tests/primitive-property-access-edge-cases.js:

(checkNumericGet.Object.defineProperty):
(checkNumericSet.Object.defineProperty):
(checkNumericGetStrict.Object.defineProperty):
(checkNumericSetStrict.Object.defineProperty):
(checkNumericRead):
(checkNumericWrite):
(checkNumericReadStrict):
(checkNumericWriteStrict):

  • Added test cases.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r109804 r109824  
     12012-03-05  Gavin Barraclough  <[email protected]>
     2
     3        putByIndex should throw in strict mode
     4        https://bugs.webkit.org/show_bug.cgi?id=80335
     5
     6        Reviewed by Filip Pizlo.
     7
     8        We'll need to pass an additional parameter.
     9
     10        Part 1 - rename JSValue::put() for integer indices to JSValue::putByIndex()
     11        to match the method in the MethodTable, make this take a parameter indicating
     12        whether the put should throw. This fixes the cases where the base of the put
     13        is a primitive.
     14
     15        * dfg/DFGOperations.cpp:
     16        (DFG):
     17        (JSC::DFG::putByVal):
     18        (JSC::DFG::operationPutByValInternal):
     19        * interpreter/Interpreter.cpp:
     20        (JSC::Interpreter::execute):
     21        (JSC::Interpreter::privateExecute):
     22        * jit/JITStubs.cpp:
     23        (JSC::DEFINE_STUB_FUNCTION):
     24        * llint/LLIntSlowPaths.cpp:
     25        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
     26        * runtime/JSObject.h:
     27        (JSC::JSValue::putByIndex):
     28        * runtime/JSValue.cpp:
     29        (JSC):
     30        * runtime/JSValue.h:
     31        (JSValue):
     32
    1332012-03-05  Sam Weinig  <[email protected]>
    234
Note: See TracChangeset for help on using the changeset viewer.