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

Issue 42643: Debugger message handler can be called from V8 thread (Closed)

Created:
11 years, 9 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev, yurys
Visibility:
Public.

Description

Debugger message handler can be called from V8 thread. The message handler function set through the debugger API is normally called in a different thread than the V8 thread where execution is stopped due to debugger event. This change adds an option to the API for specifying that the message handler should be called directly from the V8 thread. For an application like Chrome where thread dispatching is already in place this makes more sense. Add an option to the message handler debugger API to process messages in the thread where V8 is running instead of posting it to a queue for processing on a additional thread. Committed: http://code.google.com/p/v8/source/detail?r=1627

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 14

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+293 lines, -335 lines) Patch
M include/v8-debug.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/api.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/debug.h View 1 2 3 chunks +72 lines, -78 lines 0 comments Download
M src/debug.cc View 1 2 10 chunks +216 lines, -254 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
Most of this change involves moving code from the DebuggerMessageThread to Debugger where it can ...
11 years, 9 months ago (2009-03-26 14:28:16 UTC) #1
Mads Ager (chromium)
LGTM. http://codereview.chromium.org/42643/diff/6/1008 File src/debug.cc (right): http://codereview.chromium.org/42643/diff/6/1008#newcode1910 Line 1910: void Debugger::InvokeMessageHandler(Vector< uint16_t> message) { Remove space ...
11 years, 9 months ago (2009-03-27 08:01:09 UTC) #2
Søren Thygesen Gjesse
11 years, 9 months ago (2009-03-27 09:55:59 UTC) #3
http://codereview.chromium.org/42643/diff/6/1008
File src/debug.cc (right):

http://codereview.chromium.org/42643/diff/6/1008#newcode1910
Line 1910: void Debugger::InvokeMessageHandler(Vector< uint16_t> message) {
On 2009/03/27 08:01:09, Mads Ager wrote:
> Remove space in Vector< uint16_t>?

Done.

http://codereview.chromium.org/42643/diff/6/1008#newcode1919
Line 1919: // If there is not message thread just invoke the message handler
from the
On 2009/03/27 08:01:09, Mads Ager wrote:
> not -> no

Done.

http://codereview.chromium.org/42643/diff/6/1008#newcode1974
Line 1974: Vector<uint16_t>(const_cast<uint16_t *>(command.start()),
On 2009/03/27 08:01:09, Mads Ager wrote:
> remove space in "uint16_t *"?

Done.

http://codereview.chromium.org/42643/diff/6/1008#newcode2007
Line 2007: // Send an empty command to the debugger if in a break to make
JavaScript run
On 2009/03/27 08:01:09, Mads Ager wrote:
> This line looks too long.

Done.

http://codereview.chromium.org/42643/diff/6/1008#newcode2062
Line 2062: DebugMessageThread::DebugMessageThread() {
On 2009/03/27 08:01:09, Mads Ager wrote:
> Just inline this in the header?

Done.

http://codereview.chromium.org/42643/diff/6/1008#newcode2067
Line 2067: DebugMessageThread::~DebugMessageThread() {
On 2009/03/27 08:01:09, Mads Ager wrote:
> Ditto.

Done.

http://codereview.chromium.org/42643/diff/6/1007
File src/debug.h (right):

http://codereview.chromium.org/42643/diff/6/1007#newcode541
Line 541: static Semaphore* command_received_;  // Non-zero when command queue
is non-empty.
On 2009/03/27 08:01:09, Mads Ager wrote:
> The lines look too long.  Put the comments on the line before the declaration?

Rephrased comment.

Powered by Google App Engine
This is Rietveld 408576698