Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Issue 102063004: Introduce API to temporarily interrupt long running JavaScript code. (Closed)

Created:
7 years ago by Vyacheslav Egorov (Chromium)
Modified:
7 years ago
CC:
v8-dev, Paweł Hajdan Jr., Mads Ager (chromium)
Visibility:
Public.

Description

Introduce API to temporarily interrupt long running JavaScript code. It is different from termination API as interrupted JavaScript will continue to execute normally when registered InterruptCallback returns. /** * Request V8 to interrupt long running JavaScript code and invoke * the given |callback| passing the given |data| to it. After |callback| * returns control will be returned to the JavaScript code. * At any given moment V8 can remember only a single callback for the very * last interrupt request. * Can be called from another thread without acquiring a |Locker|. * Registered |callback| must not reenter interrupted Isolate. */ void RequestInterrupt(InterruptCallback callback, void* data); /** * Clear interrupt request created by |RequestInterrupt|. * Can be called from another thread without acquiring a |Locker|. */ void ClearInterrupt(); Fix Hydrogen SCE pass to avoid eliminating stack guards too aggressively. Only normal JavaScript functions are guaranteed to have stack guard in the prologue. If function is a builtin or has a custom call IC it will lack one. BUG= R=danno@chromium.org, dcarney@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=18363

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+360 lines, -5 lines) Patch
M include/v8.h View 2 chunks +19 lines, -0 lines 0 comments Download
M src/api.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M src/execution.h View 3 chunks +10 lines, -1 line 0 comments Download
M src/execution.cc View 4 chunks +49 lines, -0 lines 0 comments Download
M src/hydrogen-instructions.h View 5 chunks +17 lines, -3 lines 0 comments Download
M src/hydrogen-sce.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 chunk +253 lines, -0 lines 2 comments Download

Messages

Total messages: 7 (0 generated)
Vyacheslav Egorov (Google)
Hi! Dan, please take a look at the API part of the change. Danno, could ...
7 years ago (2013-12-04 21:30:24 UTC) #1
dcarney
lgtm https://codereview.chromium.org/102063004/diff/1/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://codereview.chromium.org/102063004/diff/1/test/cctest/test-api.cc#newcode21057 test/cctest/test-api.cc:21057: #endif // V8_OS_POSIX you've got this inside the ...
7 years ago (2013-12-05 08:06:27 UTC) #2
danno
lgtm from me too
7 years ago (2013-12-05 10:14:41 UTC) #3
Vyacheslav Egorov (Chromium)
Thanks for review. Landing. https://codereview.chromium.org/102063004/diff/1/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://codereview.chromium.org/102063004/diff/1/test/cctest/test-api.cc#newcode21057 test/cctest/test-api.cc:21057: #endif // V8_OS_POSIX On 2013/12/05 ...
7 years ago (2013-12-05 12:08:20 UTC) #4
Vyacheslav Egorov (Chromium)
The tree is throttled right now. I will just wait until branch point has past ...
7 years ago (2013-12-05 12:45:22 UTC) #5
dcarney
On 2013/12/05 12:45:22, Vyacheslav Egorov wrote: > The tree is throttled right now. I will ...
7 years ago (2013-12-18 09:49:58 UTC) #6
Vyacheslav Egorov (Chromium)
7 years ago (2013-12-18 18:38:47 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 manually as r18363 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698