Changeset 215517 in webkit


Ignore:
Timestamp:
Apr 19, 2017 10:12:37 AM (7 years ago)
Author:
jfbastien@apple.com
Message:

WebAssembly: don't expose any WebAssembly JS object if JIT is off
https://bugs.webkit.org/show_bug.cgi?id=170782

Reviewed by Saam Barati.

JSTests:

  • wasm.yaml:
  • wasm/noJIT/noJIT.js: Added.

Source/JavaScriptCore:

It's unexpected that we expose the global WebAssembly object if no
JIT is present because it can't be used to compile or
instantiate. Other APIs such as Memory should also be Inaccessible
in those circumstances.

Also ensure that we don't pre-allocate fast memories if
WebAssembly won't be used, and don't mark our intention to use a
fast TLS slot for WebAssembly.

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r215482 r215517  
     12017-04-19  JF Bastien  <jfbastien@apple.com>
     2
     3        WebAssembly: don't expose any WebAssembly JS object if JIT is off
     4        https://bugs.webkit.org/show_bug.cgi?id=170782
     5
     6        Reviewed by Saam Barati.
     7
     8        * wasm.yaml:
     9        * wasm/noJIT/noJIT.js: Added.
     10
    1112017-04-18  Mark Lam  <mark.lam@apple.com>
    212
  • trunk/JSTests/wasm.yaml

    r215475 r215517  
    1 # Copyright (C) 2016 Apple Inc. All rights reserved.
     1# Copyright (C) 2016-2017 Apple Inc. All rights reserved.
    22#
    33# Redistribution and use in source and binary forms, with or without
     
    2626- path: wasm/js-api/
    2727  cmd: runWebAssembly unless parseRunCommands
     28- path: wasm/noJIT/
     29  cmd: runNoJIT unless parseRunCommands
    2830- path: wasm/function-tests
    2931  cmd: runWebAssembly unless parseRunCommands
  • trunk/Source/JavaScriptCore/ChangeLog

    r215516 r215517  
     12017-04-19  JF Bastien  <jfbastien@apple.com>
     2
     3        WebAssembly: don't expose any WebAssembly JS object if JIT is off
     4        https://bugs.webkit.org/show_bug.cgi?id=170782
     5
     6        Reviewed by Saam Barati.
     7
     8        It's unexpected that we expose the global WebAssembly object if no
     9        JIT is present because it can't be used to compile or
     10        instantiate. Other APIs such as Memory should also be Inaccessible
     11        in those circumstances.
     12
     13        Also ensure that we don't pre-allocate fast memories if
     14        WebAssembly won't be used, and don't mark our intention to use a
     15        fast TLS slot for WebAssembly.
     16
     17        * runtime/Options.cpp:
     18        (JSC::recomputeDependentOptions):
     19
    1202017-04-19  Yusuke Suzuki  <utatane.tea@gmail.com>
    221
  • trunk/Source/JavaScriptCore/runtime/Options.cpp

    r215356 r215517  
    389389        Options::useJIT() = false;
    390390#endif
     391
     392    if (!Options::useJIT())
     393        Options::useWebAssembly() = false;
     394
     395    if (!Options::useWebAssembly()) {
     396        Options::webAssemblyFastMemoryPreallocateCount() = 0;
     397        Options::useWebAssemblyFastTLS() = false;
     398    }
     399   
    391400    if (Options::dumpDisassembly()
    392401        || Options::dumpDFGDisassembly()
Note: See TracChangeset for help on using the changeset viewer.