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

Unified Diff: runtime/bin/socket.cc

Issue 2247733005: Correct and GC unrecognized flags from our tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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/main.cc ('k') | runtime/observatory/tests/service/capture_stdio_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket.cc
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index 1e9d94efc4397f1e72597d90a33ff59b1fcb6cad..687b773bc0379980aaa11891ce4d088bc0ead32e 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -25,6 +25,10 @@ static const int kSocketIdNativeField = 0;
ListeningSocketRegistry *globalTcpListeningSocketRegistry = NULL;
+bool short_socket_read = false;
+
+bool short_socket_write = false;
+
void ListeningSocketRegistry::Initialize() {
ASSERT(globalTcpListeningSocketRegistry == NULL);
globalTcpListeningSocketRegistry = new ListeningSocketRegistry();
@@ -336,12 +340,11 @@ void FUNCTION_NAME(Socket_Available)(Dart_NativeArguments args) {
void FUNCTION_NAME(Socket_Read)(Dart_NativeArguments args) {
- static bool short_socket_reads = Dart_IsVMFlagSet("short_socket_read");
intptr_t socket =
Socket::GetSocketIdNativeField(Dart_GetNativeArgument(args, 0));
int64_t length = 0;
if (DartUtils::GetInt64Value(Dart_GetNativeArgument(args, 1), &length)) {
- if (short_socket_reads) {
+ if (short_socket_read) {
length = (length + 1) / 2;
}
uint8_t* buffer = NULL;
@@ -452,7 +455,6 @@ void FUNCTION_NAME(Socket_RecvFrom)(Dart_NativeArguments args) {
void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
- static bool short_socket_writes = Dart_IsVMFlagSet("short_socket_write");
intptr_t socket =
Socket::GetSocketIdNativeField(Dart_GetNativeArgument(args, 0));
Dart_Handle buffer_obj = Dart_GetNativeArgument(args, 1);
@@ -462,7 +464,7 @@ void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
intptr_t length =
DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 3));
bool short_write = false;
- if (short_socket_writes) {
+ if (short_socket_write) {
if (length > 1) {
short_write = true;
}
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/observatory/tests/service/capture_stdio_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698