Changeset 225352 in webkit


Ignore:
Timestamp:
Nov 30, 2017, 2:51:59 PM (8 years ago)
Author:
mark.lam@apple.com
Message:

jsc shell's flashHeapAccess() should not do JS work after releasing access to the heap.
https://bugs.webkit.org/show_bug.cgi?id=180219
<rdar://problem/35696536>

Reviewed by Filip Pizlo.

JSTests:

  • stress/regress-180219.js: Added.

Source/JavaScriptCore:

  • jsc.cpp:

(functionFlashHeapAccess):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/JSTests/ChangeLog

    r225342 r225352  
     12017-11-30  Mark Lam  <mark.lam@apple.com>
     2
     3        jsc shell's flashHeapAccess() should not do JS work after releasing access to the heap.
     4        https://bugs.webkit.org/show_bug.cgi?id=180219
     5        <rdar://problem/35696536>
     6
     7        Reviewed by Filip Pizlo.
     8
     9        * stress/regress-180219.js: Added.
     10
    1112017-11-30  Yusuke Suzuki  <utatane.tea@gmail.com>
    212
  • TabularUnified trunk/Source/JavaScriptCore/ChangeLog

    r225342 r225352  
     12017-11-30  Mark Lam  <mark.lam@apple.com>
     2
     3        jsc shell's flashHeapAccess() should not do JS work after releasing access to the heap.
     4        https://bugs.webkit.org/show_bug.cgi?id=180219
     5        <rdar://problem/35696536>
     6
     7        Reviewed by Filip Pizlo.
     8
     9        * jsc.cpp:
     10        (functionFlashHeapAccess):
     11
    1122017-11-30  Yusuke Suzuki  <utatane.tea@gmail.com>
    213
  • TabularUnified trunk/Source/JavaScriptCore/jsc.cpp

    r225333 r225352  
    17211721    auto scope = DECLARE_THROW_SCOPE(vm);
    17221722   
     1723    double sleepTimeMs = 0;
     1724    if (exec->argumentCount() >= 1) {
     1725        sleepTimeMs = exec->argument(0).toNumber(exec);
     1726        RETURN_IF_EXCEPTION(scope, encodedJSValue());
     1727    }
     1728
    17231729    vm.heap.releaseAccess();
    1724     if (exec->argumentCount() >= 1) {
    1725         double ms = exec->argument(0).toNumber(exec);
    1726         RETURN_IF_EXCEPTION(scope, encodedJSValue());
    1727         sleep(Seconds::fromMilliseconds(ms));
    1728     }
     1730    if (sleepTimeMs)
     1731        sleep(Seconds::fromMilliseconds(sleepTimeMs));
    17291732    vm.heap.acquireAccess();
    17301733    return JSValue::encode(jsUndefined());
Note: See TracChangeset for help on using the changeset viewer.