| Index: vm/dart_api_impl.cc
|
| ===================================================================
|
| --- vm/dart_api_impl.cc (revision 10203)
|
| +++ vm/dart_api_impl.cc (working copy)
|
| @@ -1590,7 +1590,7 @@
|
| intptr_t length) {
|
| Isolate* isolate = Isolate::Current();
|
| DARTSCOPE(isolate);
|
| - if (codepoints == NULL) {
|
| + if (codepoints == NULL && length != 0) {
|
| RETURN_NULL_ERROR(codepoints);
|
| }
|
| CHECK_LENGTH(length, String::kMaxElements);
|
| @@ -1602,7 +1602,7 @@
|
| intptr_t length) {
|
| Isolate* isolate = Isolate::Current();
|
| DARTSCOPE(isolate);
|
| - if (codepoints == NULL) {
|
| + if (codepoints == NULL && length != 0) {
|
| RETURN_NULL_ERROR(codepoints);
|
| }
|
| CHECK_LENGTH(length, String::kMaxElements);
|
| @@ -1614,7 +1614,7 @@
|
| intptr_t length) {
|
| Isolate* isolate = Isolate::Current();
|
| DARTSCOPE(isolate);
|
| - if (codepoints == NULL) {
|
| + if (codepoints == NULL && length != 0) {
|
| RETURN_NULL_ERROR(codepoints);
|
| }
|
| CHECK_LENGTH(length, String::kMaxElements);
|
|
|