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

Issue 104433004: Enable VM service inside Dartium Renderer processes (Closed)

Created:
7 years ago by Cutch
Modified:
7 years ago
Reviewers:
Jacob, siva
CC:
reviews+dom_dartlang.org
Visibility:
Public.

Description

This CL does the following: * When the main DOM isolate is created the VM service isolate is also initialized. * Whenever isolates come up or go down they register with the VM service. * Provides a mechanism for C++ code to query the VM service and have a callback called with the reply from the service. * Adds a pane to Chrome DevTools which renders the Observatory which is hosted on a remote server. * Adds messages to the devtools protocol for the observatory to communicate with. Notes: * There is one VM service isolate per renderer process. * Whether or not the service is initialized can be controlled by the environment variable DARTIUM_VMSERVICE. * Instead of an HTTP server the VM service running in a Dartium renderer process has a Dart_Port for submitting requests. The VM service responds to requests by posting to a native port. * The VM service shares almost all Dart source code with the standalone VM service. R=jacobr@google.com Committed: https://src.chromium.org/viewvc/multivm/branches/1650/blink?view=rev&revision=1624

Patch Set 1 #

Total comments: 35

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 13

Patch Set 5 : #

Patch Set 6 : #

Total comments: 20

Patch Set 7 : #

Total comments: 7

Patch Set 8 : #

Patch Set 9 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+974 lines, -56 lines) Patch
M Source/bindings/dart/DartApplicationLoader.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/dart/DartController.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M Source/bindings/dart/DartController.cpp View 1 2 3 4 5 6 7 5 chunks +27 lines, -1 line 1 comment Download
A Source/bindings/dart/DartService.h View 1 2 3 4 5 6 1 chunk +68 lines, -0 lines 1 comment Download
A Source/bindings/dart/DartService.cpp View 1 2 3 4 5 6 1 chunk +498 lines, -0 lines 0 comments Download
A Source/bindings/dart/DartServiceInternal.h View 1 chunk +21 lines, -0 lines 0 comments Download
A Source/bindings/dart/DartServiceInternal.cpp View 1 2 3 4 5 6 7 1 chunk +87 lines, -0 lines 1 comment Download
M Source/bindings/dart/gyp/dartium.gyp View 2 chunks +32 lines, -0 lines 0 comments Download
M Source/bindings/dart/gyp/overrides.gypi View 2 chunks +5 lines, -0 lines 0 comments Download
A Source/bindings/dart/gyp/resources_sources.gypi View 1 2 3 4 5 6 1 chunk +20 lines, -0 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/inspector/InspectorController.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/inspector/InspectorController.cpp View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
A + Source/core/inspector/InspectorDartAgent.h View 1 2 3 4 5 6 7 3 chunks +13 lines, -15 lines 0 comments Download
A Source/core/inspector/InspectorDartAgent.cpp View 1 2 3 4 5 6 7 1 chunk +101 lines, -0 lines 0 comments Download
M Source/devtools/devtools.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A + Source/devtools/front_end/DartPanel.js View 1 2 3 4 5 6 7 4 chunks +8 lines, -8 lines 0 comments Download
A + Source/devtools/front_end/DartView.js View 1 2 3 4 5 6 7 3 chunks +48 lines, -32 lines 0 comments Download
M Source/devtools/front_end/inspector.html View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/devtools/front_end/inspector.js View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M Source/devtools/protocol.json View 1 2 3 4 5 6 7 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Cutch
7 years ago (2013-12-04 19:39:04 UTC) #1
Jacob
Looks good! Here's a first batch of comments. https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartController.cpp File Source/bindings/dart/DartController.cpp (right): https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartController.cpp#newcode236 Source/bindings/dart/DartController.cpp:236: ASSERT(Dart_CurrentIsolate() ...
7 years ago (2013-12-04 20:39:52 UTC) #2
Cutch
https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartController.cpp File Source/bindings/dart/DartController.cpp (right): https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartController.cpp#newcode236 Source/bindings/dart/DartController.cpp:236: ASSERT(Dart_CurrentIsolate() == m_isolate); On 2013/12/04 20:39:52, Jacob wrote: > ...
7 years ago (2013-12-04 21:20:50 UTC) #3
Cutch
Patch Set 4 is ready for a real review.
7 years ago (2013-12-05 00:57:41 UTC) #4
Jacob
https://codereview.chromium.org/104433004/diff/50001/Source/bindings/dart/DartController.cpp File Source/bindings/dart/DartController.cpp (right): https://codereview.chromium.org/104433004/diff/50001/Source/bindings/dart/DartController.cpp#newcode234 Source/bindings/dart/DartController.cpp:234: const bool shouldStartService = !getenv("DARTIUM_VMSERVICE"); no need for const ...
7 years ago (2013-12-05 19:31:30 UTC) #5
Cutch
https://codereview.chromium.org/104433004/diff/50001/Source/bindings/dart/DartController.cpp File Source/bindings/dart/DartController.cpp (right): https://codereview.chromium.org/104433004/diff/50001/Source/bindings/dart/DartController.cpp#newcode234 Source/bindings/dart/DartController.cpp:234: const bool shouldStartService = !getenv("DARTIUM_VMSERVICE"); On 2013/12/05 19:31:31, Jacob ...
7 years ago (2013-12-05 22:48:15 UTC) #6
Cutch
7 years ago (2013-12-05 22:48:17 UTC) #7
Jacob
last round of comments https://codereview.chromium.org/104433004/diff/90001/Source/bindings/dart/DartServiceInternal.cpp File Source/bindings/dart/DartServiceInternal.cpp (right): https://codereview.chromium.org/104433004/diff/90001/Source/bindings/dart/DartServiceInternal.cpp#newcode8 Source/bindings/dart/DartServiceInternal.cpp:8: // TODO(johnmccutchan): Expose these methods ...
7 years ago (2013-12-05 22:56:12 UTC) #8
Jacob
https://codereview.chromium.org/104433004/diff/110001/Source/bindings/dart/DartController.cpp File Source/bindings/dart/DartController.cpp (right): https://codereview.chromium.org/104433004/diff/110001/Source/bindings/dart/DartController.cpp#newcode234 Source/bindings/dart/DartController.cpp:234: bool shouldStartService = !getenv("DARTIUM_VMSERVICE"); remove this local variable and ...
7 years ago (2013-12-05 22:59:58 UTC) #9
Cutch
https://codereview.chromium.org/104433004/diff/90001/Source/bindings/dart/DartServiceInternal.cpp File Source/bindings/dart/DartServiceInternal.cpp (right): https://codereview.chromium.org/104433004/diff/90001/Source/bindings/dart/DartServiceInternal.cpp#newcode8 Source/bindings/dart/DartServiceInternal.cpp:8: // TODO(johnmccutchan): Expose these methods to the embedder API ...
7 years ago (2013-12-05 23:09:36 UTC) #10
Jacob
lgtm
7 years ago (2013-12-05 23:12:13 UTC) #11
Cutch
Committed patchset #9 manually as r1624.
7 years ago (2013-12-05 23:26:22 UTC) #12
siva
7 years ago (2013-12-13 21:48:22 UTC) #13
Message was sent while issue was closed.
https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartCon...
File Source/bindings/dart/DartController.cpp (right):

https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartCon...
Source/bindings/dart/DartController.cpp:243: Dart_EnterIsolate(m_isolate);
Why not move the EnterScope/ExitScope stuff to SendIsolateStartupMessage().

Also use DartApiScope instead of the Enter/Exit stuff.

https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartCon...
Source/bindings/dart/DartController.cpp:440: Dart_Isolate isolate =
createIsolate(scriptURL, entryPoint, document, false, errorMsg);
Ditto comment about Enter/Exit Scope

https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartCon...
Source/bindings/dart/DartController.cpp:590:
Dart_Initialize(&createPureIsolateCallback, 0, 0,
DartService::VmServiceShutdownCallback, openFileCallback, readFileCallback,
writeFileCallback, closeFileCallback, generateEntropy);
You should have a  generic shutdown callback and inside of that call
DartService::VmServiceShutdownCallback if it is the VM service Isolate.

https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartSer...
File Source/bindings/dart/DartService.h (right):

https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartSer...
Source/bindings/dart/DartService.h:49: }
}  // namespace WebCore

https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartSer...
File Source/bindings/dart/DartServiceInternal.h (right):

https://codereview.chromium.org/104433004/diff/1/Source/bindings/dart/DartSer...
Source/bindings/dart/DartServiceInternal.h:19: }
}  // namespace WebCore

https://codereview.chromium.org/104433004/diff/150001/Source/bindings/dart/Da...
File Source/bindings/dart/DartController.cpp (right):

https://codereview.chromium.org/104433004/diff/150001/Source/bindings/dart/Da...
Source/bindings/dart/DartController.cpp:238: if (getenv("DARTIUM_VMSERVICE")) {
I am hoping this will be a stop gap arrangement until we find a better way of
starting up the vm service, maybe it could be inside the VM and vm flags would
take care of it.

https://codereview.chromium.org/104433004/diff/150001/Source/bindings/dart/Da...
File Source/bindings/dart/DartService.h (right):

https://codereview.chromium.org/104433004/diff/150001/Source/bindings/dart/Da...
Source/bindings/dart/DartService.h:27: const String& GetRequestString() { return
m_request; };
GetRequestString() const { ... }

https://codereview.chromium.org/104433004/diff/150001/Source/bindings/dart/Da...
File Source/bindings/dart/DartServiceInternal.cpp (right):

https://codereview.chromium.org/104433004/diff/150001/Source/bindings/dart/Da...
Source/bindings/dart/DartServiceInternal.cpp:26: #include "vm/snapshot.h"  //
NOLINT.
I am presuming all these includes are also temporary, we are supposed to only
use the API calls from external code.

Powered by Google App Engine
This is Rietveld 408576698