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

Changeset 197094 in webkit


Ignore:
Timestamp:
Feb 25, 2016, 3:08:42 AM (11 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r196948 - [JSC shell] Don't put empty arguments array to VM.
​https://bugs.webkit.org/show_bug.cgi?id=154516

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-02-22
Reviewed by Geoffrey Garen.

This allows arrowfunction-lexical-bind-arguments-top-level test to pass
in jsc as well as in browser.

Source/JavaScriptCore:

  • jsc.cpp:

(GlobalObject::finishCreation):

LayoutTests:

  • js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js:

Removed @ skip annotation.

Location:
releases/WebKitGTK/webkit-2.12
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog

    r197091 r197094  
     12016-02-22  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [JSC shell] Don't put empty arguments array to VM.
     4        https://bugs.webkit.org/show_bug.cgi?id=154516
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        This allows arrowfunction-lexical-bind-arguments-top-level test to pass
     9        in jsc as well as in browser.
     10
     11        * js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js:
     12        Removed @ skip annotation.
     13
    1142016-02-21  Chris Dumez  <cdumez@apple.com>
    215
  • releases/WebKitGTK/webkit-2.12/LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js

    r196718 r197094  
    1 // jsc always has arguments, but in browser we do not have arguments, so
    2 // ignore this test in run-jsc-stress-tests, but run in run-webkit-tests.
    3 //@ skip
    4 
    51description('Tests for ES6 arrow function lexical bind of arguments on top level');
    62
  • releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog

    r197092 r197094  
     12016-02-22  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [JSC shell] Don't put empty arguments array to VM.
     4        https://bugs.webkit.org/show_bug.cgi?id=154516
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        This allows arrowfunction-lexical-bind-arguments-top-level test to pass
     9        in jsc as well as in browser.
     10
     11        * jsc.cpp:
     12        (GlobalObject::finishCreation):
     13
    1142016-02-21  Joseph Pecoraro  <pecoraro@apple.com>
    215
  • releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/jsc.cpp

    r196745 r197094  
    753753#endif
    754754
    755         JSArray* array = constructEmptyArray(globalExec(), 0);
    756         for (size_t i = 0; i < arguments.size(); ++i)
    757             array->putDirectIndex(globalExec(), i, jsString(globalExec(), arguments[i]));
    758         putDirect(vm, Identifier::fromString(globalExec(), "arguments"), array);
    759        
     755        if (!arguments.isEmpty()) {
     756            JSArray* array = constructEmptyArray(globalExec(), 0);
     757            for (size_t i = 0; i < arguments.size(); ++i)
     758                array->putDirectIndex(globalExec(), i, jsString(globalExec(), arguments[i]));
     759            putDirect(vm, Identifier::fromString(globalExec(), "arguments"), array);
     760        }
     761
    760762        putDirect(vm, Identifier::fromString(globalExec(), "console"), jsUndefined());
    761763    }
Note: See TracChangeset for help on using the changeset viewer.