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

Side by Side Diff: Source/bindings/core/dart/DartUtilities.cpp

Issue 1653163002: Dart snapshot runs & and few other misc things. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Created 4 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011, Google Inc. 1 // Copyright 2011, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 for (size_t i = 0; i < elements.size(); i++) { 1038 for (size_t i = 0; i < elements.size(); i++) {
1039 Dart_Handle element = elements[i]; 1039 Dart_Handle element = elements[i];
1040 if (DartUtilities::isMessagePort(element)) { 1040 if (DartUtilities::isMessagePort(element)) {
1041 MessagePort* messagePort = DartUtilities::dartMessagePortToNativeMes sagePort(element); 1041 MessagePort* messagePort = DartUtilities::dartMessagePortToNativeMes sagePort(element);
1042 ASSERT(messagePort); 1042 ASSERT(messagePort);
1043 ports.append(messagePort); 1043 ports.append(messagePort);
1044 continue; 1044 continue;
1045 } 1045 }
1046 1046
1047 if (Dart_IsByteBuffer(element)) { 1047 if (Dart_IsByteBuffer(element)) {
1048 /* TODO(terry): Comment out to build 45 Roll - fix/review.
1048 element = Dart_GetDataFromByteBuffer(element); 1049 element = Dart_GetDataFromByteBuffer(element);
1049 RefPtr<ArrayBuffer> arrayBuffer = DartUtilities::dartToExternalizedA rrayBuffer(element, exception); 1050 RefPtr<ArrayBuffer> arrayBuffer = DartUtilities::dartToExternalizedA rrayBuffer(element, exception);
1050 ASSERT(!exception); 1051 ASSERT(!exception);
1051 ASSERT(arrayBuffer); 1052 ASSERT(arrayBuffer);
1052 arrayBuffers.append(arrayBuffer); 1053 arrayBuffers.append(arrayBuffer);
1053 continue; 1054 continue;
1055 */
1054 } 1056 }
1055 1057
1056 exception = Dart_NewStringFromCString("TransferArray argument must conta in only Transferables"); 1058 exception = Dart_NewStringFromCString("TransferArray argument must conta in only Transferables");
1057 return; 1059 return;
1058 } 1060 }
1059 } 1061 }
1060 1062
1061 LocalDOMWindow* DartUtilities::domWindowForCurrentIsolate() 1063 LocalDOMWindow* DartUtilities::domWindowForCurrentIsolate()
1062 { 1064 {
1063 DartDOMData* domData = DartDOMData::current(); 1065 DartDOMData* domData = DartDOMData::current();
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 if (!v) { 1395 if (!v) {
1394 return 0; 1396 return 0;
1395 } 1397 }
1396 ASSERT(valueLen > 0 && static_cast<size_t>(valueLen) > strlen(v)); 1398 ASSERT(valueLen > 0 && static_cast<size_t>(valueLen) > strlen(v));
1397 strncpy(value, v, valueLen); 1399 strncpy(value, v, valueLen);
1398 value[valueLen - 1] = '\0'; 1400 value[valueLen - 1] = '\0';
1399 return strlen(value); 1401 return strlen(value);
1400 #endif 1402 #endif
1401 } 1403 }
1402 } 1404 }
OLDNEW
« no previous file with comments | « Source/bindings/core/dart/DartInjectedScript.cpp ('k') | Source/bindings/core/dart/dart-extras.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698