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

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: skybrian review 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
« no previous file with comments | « runtime/bin/vmservice_impl.h ('k') | runtime/observatory/HACKING.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice_impl.cc
diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc
index b7f4df47680dc4098df1def39ed98df8d8899cfc..cfb05caf00cfcf5534e207ba16e0fa0eddf44584 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("_originCheckDisabled"),
+ Dart_NewBoolean(dev_mode_server));
// Are we running on Windows?
#if defined(TARGET_OS_WINDOWS)
« no previous file with comments | « runtime/bin/vmservice_impl.h ('k') | runtime/observatory/HACKING.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698