| OLD | NEW |
| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 result = receiver->send(data, ec); | 103 result = receiver->send(data, ec); |
| 104 } else { | 104 } else { |
| 105 exception = Dart_NewString("Unsupported data argument type"); | 105 exception = Dart_NewString("Unsupported data argument type"); |
| 106 goto fail; | 106 goto fail; |
| 107 } | 107 } |
| 108 | 108 |
| 109 if (UNLIKELY(ec)) { | 109 if (UNLIKELY(ec)) { |
| 110 exception = DartDOMWrapper::exceptionCodeToDartException(ec); | 110 exception = DartDOMWrapper::exceptionCodeToDartException(ec); |
| 111 goto fail; | 111 goto fail; |
| 112 } | 112 } |
| 113 Dart_SetReturnValue(args, DartUtilities::boolToDart(result)); | |
| 114 return; | 113 return; |
| 115 } | 114 } |
| 116 | 115 |
| 117 fail: | 116 fail: |
| 118 Dart_ThrowException(exception); | 117 Dart_ThrowException(exception); |
| 119 ASSERT_NOT_REACHED(); | 118 ASSERT_NOT_REACHED(); |
| 120 } | 119 } |
| 121 | 120 |
| 122 } | 121 } |
| 123 | 122 |
| 124 } | 123 } |
| 125 | 124 |
| 126 #endif // ENABLE(WEB_SOCKETS) | 125 #endif // ENABLE(WEB_SOCKETS) |
| OLD | NEW |