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

Unified Diff: runtime/bin/vmservice_impl.cc

Issue 2125343002: Ban cross origin WebSocket connections to the service protocol (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: hacking.md Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/vmservice_impl.cc
diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc
index b7f4df47680dc4098df1def39ed98df8d8899cfc..cb16921fce7270a4032711330fc9fcf572ac8f52 100644
--- a/runtime/bin/vmservice_impl.cc
+++ b/runtime/bin/vmservice_impl.cc
@@ -176,7 +176,8 @@ bool VmService::LoadForGenPrecompiled() {
bool VmService::Setup(const char* server_ip,
intptr_t server_port,
- bool running_precompiled) {
+ bool running_precompiled,
+ bool dev_mode_server) {
Dart_Isolate isolate = Dart_CurrentIsolate();
ASSERT(isolate != NULL);
SetServerIPAndPort("", 0);
@@ -241,6 +242,9 @@ bool VmService::Setup(const char* server_ip,
DartUtils::NewString("_autoStart"),
Dart_NewBoolean(auto_start));
SHUTDOWN_ON_ERROR(result);
+ result = Dart_SetField(library,
+ DartUtils::NewString("_serverDevMode"),
+ Dart_NewBoolean(dev_mode_server));
// Are we running on Windows?
#if defined(TARGET_OS_WINDOWS)

Powered by Google App Engine
This is Rietveld 408576698